An open source social media API built with Node.js, Express, and MongoDB. This API is built for developers to use in their projects. It is not meant to be used as a standalone social media platform. This API is still in development and is not ready for production use.
-
This project is powered by NixLab Technologies.
-
If you would like to contribute to this project, please see the contributing guidelines.
-
We are open to suggestions and contributions. Feel free to open an issue or a pull request. If you like the project, please consider giving it a star.
-
Due to database limitations, the API is currently hosted on a free tier of MongoDB Atlas. So, it may take a few seconds to respond to your request. Please be patient.
-
This API is currently in development stage. So, after releasing the production version, we will be adding more features to it. You can check the progress of the project here. If you have any suggestions, feel free to open an issue.
-
For the production version, we are planning to host the API on AWS and a paid tier of MongoDB Atlas. So, it will be more reliable and faster.
-
After releasing the production version, we may delete some of the data in the database for better and faster performance. Data will be deleted only if it is not required for the project or it may cause any issues or conflicts.
If you would like to contribute, please read the contribution guidelines.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Nikhil Rajput - Owner & Lead Developer
- User Authentication
- Post Feed
- Post Creation
- Post Editing
- Post Deletion
- Post Liking
- Post Commenting
- Post Sharing
- Post Searching
- Post Filtering
- Post Sorting
- Post Reporting
- Post Blocking
- Post Muting
- Profile Creation
- Profile Editing
- Profile Deactivation
- User Following
- User Unfollowing
- User Blocking
- User Muting
- User Searching
- User Filtering
- Trending Posts
- Hash Tagging
- Post Tagging
- User Tagging
- Recommendations
- Search Suggestions
- Star and Fork the repository
- Clone the repository
git clone https://github.com/<your-github-username>/social-media-api-nodejs.git
- Install required modules
npm install
- Create a new directory
config
insrc
directory - Create a new file
config.env
inconfig
directory - Add following VARIABLES in
config.env
or in production Environment Variables - Replace XXXXXXXXXXXXXXXXXX with your own values
PORT = YOUR PORT
MONGO_URI = 'XXXXXXXXXXXXXXXXXX'
DB_NAME = 'XXXXXXXXXXXXXXXXXX'
NODE_ENV = 'development'
JWT_SECRET = 'XXXXXXXXXXXXXXXXXX'
JWT_EXPIRES_IN = 7d
SMTP_FROM = 'Test <noreply@yourcompany.com>'
SENDGRID_API_KEY = 'XXXXXXXXXXXXXXXXXX'
# Cloudinary
CLOUDINARY_CLOUD_NAME = 'XXXXXXXXXXXXXXXXXX'
CLOUDINARY_API_KEY = 'XXXXXXXXXXXXXXXXXX'
CLOUDINARY_API_SECRET = 'XXXXXXXXXXXXXXXXXX'
# Twilio
TWILIO_ACCOUNT_SID = 'XXXXXXXXXXXXXXXXXX'
TWILIO_AUTH_TOKEN = 'XXXXXXXXXXXXXXXXXX'
TWILIO_PHONE_NO = 'XXXXXXXXXXXXXXXXXX'
# Firebase
FIREBASE_TYPE = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_PROJECT_ID = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_PRIVATE_KEY_ID = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_PRIVATE_KEY = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_CLIENT_EMAIL = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_CLIENT_ID = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_AUTH_URI = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_TOKEN_URI = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_AUTH_PROVIDER_X509_CERT_URL = 'XXXXXXXXXXXXXXXXXX'
FIREBASE_CLIENT_X509_CERT_URL = 'XXXXXXXXXXXXXXXXXX'
- Run the server
npm run dev
This project is licensed under the GPL-3.0 License - see the LICENSE.md file for details.