A community to share your thoughts on several topics.
TABLE OF CONTENTS
Javascript and CSS follows the Airbnb code standards
This application offers a a clean, friendly, and easy to use forum like experience, where user's may sign up and right away start discussing on several topics. With many other forum based websites on the net, BoForums does this different by making it quick to use, and focuses heavily on the user experience.
-
Visit https://mongodb.com and register an account
-
Create a project and a free shared database
-
After creation, click on Connect and choose Connect your application
-
Make sure Driver is set to Node.js
-
Save the URI string, and replace the password with a password of your choice, and replace myFirstDatabase with the name you want your database to have
-
Clone the repository to your local files
-
Install npm packages for both the front- and backend. Frontend files are located in the /frontend folder. Backend files are located in the root folder.
npm install
- To start the Node server, in the root folder, run:
npm run dev
- To start the Vue server, in the frontend folder, run:
npm run serve
-
In the root folder, if not already created, create a .env file
-
In the .env file, add 3 environment variables:
MONGO_URI
JWT_SECRET
PORT
-
Set the MONGO_URI to the URI string you recievied from your MongoDB cluster
-
Set JWT_SECRET to any string you want, but recommended that it is a longer string, that includes lowercase, uppercase, numbers, and special characters.
-
Set the PORT to a port of your choice. By standard it will be set to 5000
Page | Description |
---|---|
Homepage / |
The page the when first entering the application |
Authentication Pages /login /register |
Pages for authenticating users |
Post Pages /categories /posts /post/:id /create-post /edit-post |
Pages related to finding, viewing posts and managing posts |
User Pages /profile /my-profile |
Pages for viewing the authenticated user's profile, aswell as other user's profiles |
Admin Pages /admin |
Pages for the administrators |
The user document has all the information about the user, including email, username, password, bio and country. The document also has an array of liked posts, which tracks which posts the user has liked. The document also has a role based property, called isAdmin, which tracks if the user is an admin or not.
The post document has all the information about the post, including title, body, likecount, category, and a creator object, which is an object of the user that created the post. The document also has an array of comments. Each comment has a message, and a creator object, which is an object of the user that left the comment.
- Oskar Boström Github
Distributed under the GNU General Public License v3.0.