Skip to content

chas-academy/u11-fullstack-js-Oskar-Mikael

Repository files navigation

Contributors Forks Issues

BoForums

A community to share your thoughts on several topics.

TABLE OF CONTENTS

About the Project

Built with

Standards and Structure

Javascript and CSS follows the Airbnb code standards

Goals and Context

Project Solves

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.

Getting Started

Create a MongoDB cluster

  1. Visit https://mongodb.com and register an account

  2. Create a project and a free shared database

  3. After creation, click on Connect and choose Connect your application

  4. Make sure Driver is set to Node.js

  5. 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

Installation

  1. Clone the repository to your local files

  2. 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
  1. To start the Node server, in the root folder, run:
npm run dev
  1. To start the Vue server, in the frontend folder, run:
npm run serve
  1. In the root folder, if not already created, create a .env file

  2. In the .env file, add 3 environment variables:

MONGO_URI
JWT_SECRET
PORT
  1. Set the MONGO_URI to the URI string you recievied from your MongoDB cluster

  2. Set JWT_SECRET to any string you want, but recommended that it is a longer string, that includes lowercase, uppercase, numbers, and special characters.

  3. Set the PORT to a port of your choice. By standard it will be set to 5000

Page and Route Descriptions

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

Database-structure

Users

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.

image

Posts

image

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.

Contributors

License

Distributed under the GNU General Public License v3.0.

About

u11-fullstack-js-Oskar-Mikael created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published