This is the backend service for the Splinx application, providing APIs for user management, real-time chat, payment processing, and more.
- User authentication and authorization (JWT-based)
- Profile management
- Real-time chat functionality using Socket.io
- Payment integration with Flutterwave
- Event creation and management
- Community features (posts, comments, likes)
- Admin panel for managing users and content
- Lead generation
- Email notifications
- Wallet system
- Subscription plans
- Promo codes
- Secure file uploads to Cloudinary
- API documentation using Swagger
- Node.js
- Express.js
- MongoDB (with Mongoose)
- Socket.io
- Flutterwave API
- Cloudinary API
- JWT (JSON Web Tokens)
- bcrypt (for password hashing)
- Nodemailer (for email sending)
- Winston (for logging)
- Swagger (for API documentation)
- Helmet (for security headers)
- CORS
- Multer (for file uploads)
- Axios (for HTTP requests)
- body-parser
- dotenv
- Clone the repository:
git clone <repository-url> - Navigate to the project directory:
cd splinx-backend - Install dependencies:
npm install - Create a
.envfile in the root directory and add the necessary environment variables (see Environment Variables section). - Start the server:
npm startornpm run dev(for development)
API documentation is generated using Swagger.
- To generate/update the documentation:
npm run swagger - Access the documentation at
/api-docsendpoint when the server is running (e.g.,http://localhost:PORT/api-docs).
Create a .env file in the root of the project and add the following variables:
PORT: The port the application will run on (e.g., 3000)MONGODB_URI: Your MongoDB connection stringJWT_SECRET: Secret key for JWT signingCLOUDINARY_CLOUD_NAME: Your Cloudinary cloud nameCLOUDINARY_API_KEY: Your Cloudinary API keyCLOUDINARY_API_SECRET: Your Cloudinary API secretFLUTTERWAVE_PUBLIC_KEY: Your Flutterwave public keyFLUTTERWAVE_SECRET_KEY: Your Flutterwave secret keyFLUTTERWAVE_ENCRYPTION_KEY: Your Flutterwave encryption keyEMAIL_HOST: SMTP host for sending emailsEMAIL_PORT: SMTP port for sending emailsEMAIL_USER: Username for SMTP authenticationEMAIL_PASS: Password for SMTP authenticationTEXTFLOW_API_KEY: API key for TextFlow (if used for SMS)
- To start the server:
npm start - To run in development mode (with automatic restarts):
npm run dev
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name - Make your changes and commit them:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature/your-feature-name - Open a pull request.
This project is licensed under the ISC License.