Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amanmandal-m/boo_world
Boo Backend is a versatile application designed to facilitate the creation of user accounts, comments, and the ability to like or dislike comments with ease and efficiency. This robust platform provides a seamless user experience for managing interactions within the system.
https://github.com/amanmandal-m/boo_world
chai ejs-templates express-js mocha mongodb mongodb-memory-server mongoose node-js supertest
Last synced: 23 days ago
JSON representation
Boo Backend is a versatile application designed to facilitate the creation of user accounts, comments, and the ability to like or dislike comments with ease and efficiency. This robust platform provides a seamless user experience for managing interactions within the system.
- Host: GitHub
- URL: https://github.com/amanmandal-m/boo_world
- Owner: Amanmandal-M
- Created: 2023-09-23T18:02:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-24T14:09:28.000Z (about 1 year ago)
- Last Synced: 2024-10-15T17:32:03.501Z (23 days ago)
- Topics: chai, ejs-templates, express-js, mocha, mongodb, mongodb-memory-server, mongoose, node-js, supertest
- Language: EJS
- Homepage:
- Size: 224 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Welcome to Boo World Backend
## About
Boo Backend is a versatile application designed to facilitate the creation of user accounts, comments, and the ability to like or dislike comments with ease and efficiency. This robust platform provides a seamless user experience for managing interactions within the system.
## Features
- Creating a new User Profile
- You can do comments and likes, unlikes
- Relationships Comments with profileID.
- Error Handling.## Technologies Used
- Node.js
- MongoDB
- Mocha (For unit testing)## Clone Repository
```
git clone https://github.com/Amanmandal-M/boo_world.git
```### Prerequisites
- Javascript
- NodeJS
- MongoDB## Installation
```
cd boo_world
npm run start
```## Start the Backend server
```
npm run start
or
npm run server
or
node app.js
```## MVC Structure
```js
├── app.js
├── configs
| └── db.js
├── models
| └── profileModel.js
| └── commentModel.js
├── routes
| └── profile.js
| └── comment.js
├──controllers
| └── profile.js
| └── comment.js
| └── HomePageController.js
├──views
| ├──partials
| | └── categories.ejs
| | └── epilogue.ejs
| | └── footer.ejs
| | └── header.ejs
| | └── metadata.ejs
| | └── profile_card.ejs
| | └── prologue.ejs
| | └── scripts.ejs
| | └── styles.ejs
| └──profile_template.ejs
├──helpers
| └── successAndError.js
├──public
| ├── static
| | └── space.png
| | └── wing.png
| ├── sample.md
```Note :
- Before doing anything first create `.env` file and put `PORT`, `NODE_ENV, MONGO_URI`.
- If you are not using `MONGO_URI` so don't worry it will run automatically using mongoDB-memory-server
- `PORT` is for listening the server.
- `MONGO_URL` is for running database and store your data in database so put your mongo link.
- `NODE_ENV` is for accessing database for test and it is like a authentication but not full authentication .## Endpoints
Models
Method
Endpoint
Description
Status Code
Profile
POST
/profile/
This endpoint should allow to create a new Profile and store in database.
200
Profile
Get
/profile/:id
This endpoint should allow to view profile by its id.
200
Comment
GET
/comment/
This endpoint should allow to view all comments with profileId.
200
Comment
GET
/comment/:profileId
This endpoint should allow to view comments by profileId.
200
Comment
POST
/comment/
This endpoint should allow to create a new comment using profileId.
200
Comment
POST
/like/:commentId
This endpoint should allow to like comments by commentId.
200
Comment
POST
/unlike/:commentId
This endpoint should allow to unlike comments by commentId.
200
## Schema
### Profile Schema
```js
{
name: {
type: String,
required: true,
},
description: {
type: String,
required: true,
},
mbti: {
type: String,
required: true,
},
enneagram: {
type: String,
required: true,
},
variant: {
type: String,
required: true,
},
tritype: {
type: Number,
required: true,
},
socionics: {
type: String,
required: true,
},
sloan: {
type: String,
required: true,
},
psyche: {
type: String,
required: true,
},
image: {
type: String,
required: true,
},
}
```### Comment Schema
```js
{
profileId: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Profile'
},
author: {
type: String,
required: true,
},
text: {
type: String,
},
likes: {
type: Number,
default: 0
}
}
```
### Contributing
If you'd like to contribute to this project, please follow these steps:
1. Fork the repository
2. Create a new branch (`git checkout -b feature/your-feature`)
3. Commit your changes (`git commit -m 'Add some feature'`)
4. Push to the branch (`git push origin feature/your-feature`)
5. Create a new Pull Request