This project is a boilerplate code. For quickly getting started with a social networking. This is purely a backend project where only APIs can be exposed
- You need MongoDB, use attached docker-compose file(in devops folder) for quickly installing MongoDB OR You follow your own procedure for installing MongoDB
- Run
npm install - Run server
npm run start:dev
I used this project for generating my boilerplate code - https://github.com/seanpmaxwell/express-generator-typescript
- Expressjs
- Nodejs
- Typescript
- MongoDB
- Mongoose
- JWT token
-
Category - Use this to set a category for a post Main Column
- name - Use this to set a name to Category
-
Comment - Use this for either reviews or comments Main Columns
- Description
- User Id
- Rating
-
Group - This is used for setting the group of a user. The user can be of any type(admin, customer, etc.) Main Coumns
- name - Name of the Group
- value - Any Integer value
-
Photo - As the name suggests, use this for posts Main Columns
- photoUrl
- title
-
Post - This is the crux of the APIs - All the relevant apis have been built, check the
postman routes zip folderMain Columns- title
- description
- photos - it could contain many photos
- comments - it could contain many comments
-
User - Another important API Main Columns
- Groups
- Email, we need maintian unique emails
-
FileHandler This is implemented using GridFS Stream, Grid FS Store and Multer - thanks to https://github.com/bradtraversy/mongo_file_uploads
I have also attached PostMan routes for testing the APIs
Attached a docker file for you so that you can quickly get started with MongoDB installation
I use community version of Mongo Compass for viewing the values of the tables.
Check out this following project for deploying to production - https://github.com/seanpmaxwell/express-generator-typescript
Write the test cases
Of course whatever the conditions that are applicable in MIT License