Welcome to the AbegHelp.me Backend project! This is a Node.js and ExpressJS backend application designed to power the fundraising platform AbegHelp.me. The project is built with TypeScript and includes features like campaign management, user authentication, email notifications, and more.
- Campaign Management:
- Create, update, and manage fundraising campaigns in multiple steps.
- Campaigns can be reviewed, approved, or rejected based on content relevance.
- Authentication & Security:
- JWT-based authentication.
- Two-Factor Authentication (2FA) via email or app.
- Secure cookie handling with HTTP-only and SameSite policies.
- Email Notifications:
- Welcome emails, 2FA codes, password resets, and other notifications.
- Uses Resend for email delivery.
- Queue System:
- Background tasks like email sending and campaign processing are handled by BullMQ.
- Security Measures:
- Rate limiting, CORS, CSP (Content Security Policy), and other security best practices.
- Environment Configuration:
- Uses
.env
files for environment-specific configurations.
- Uses
Before you begin, ensure you have the following installed:
- Node.js (>=20.11.0) and npm or yarn.
- MongoDB (for database).
- Redis (for caching and queue management).
-
Clone the repository:
git clone https://github.com/abeghelpme/backend.git cd backend
-
Install dependencies:
npm install
or
yarn install
-
Set up environment variables:
- Create a
.env
file in the project root. - Add the following variables:
APP_NAME=AbegHelp APP_PORT=3000 NODE_ENV=development MONGO_URI=your-mongodb-uri REDIS_URL=your-redis-url EMAIL_API_KEY=your-resend-api-key JWT_ACCESS_KEY=your-jwt-access-key
- Create a
-
Start the development server:
npm run dev
-
Build the project for production:
npm run build
-
Start the production server:
npm start
src/
: Contains the source code.controllers/
: Handles request logic.models/
: Defines MongoDB schemas.queues/
: Manages background tasks using BullMQ.routes/
: Defines API routes.scripts/
: Contains utility scripts like seeders.common/
: Shared utilities, constants, and interfaces.
build/
: Contains the compiled TypeScript code (generated after build).
We welcome contributions! Please follow our Contribution Guidelines to get started.
This project is proprietary and confidential. Unauthorized copying, transferring, or reproduction of the contents of this project is strictly prohibited.
For any issues or questions, please open an issue in the GitHub repository.
Happy Coding! 🚀