Full-stack web app for managing charity campaigns and donations.
Live: https://apex.maqsatto.tech
Team Apex — Maqsat, Bekzat, Nazarbek, Raibek
- Backend: Node.js, Express, MongoDB/Mongoose, JWT, Joi, Resend (email)
- Frontend: HTML/CSS/JS, Fetch API
src/
controllers/ — auth, campaign, donation, user logic
models/ — User, Campaign, Donation schemas
routes/ — API route definitions
middleware/ — auth, roles, validation, error handling
config/ — DB connection, email setup
app.js — Express app
frontend/
index.html — campaign listing
login.html — login page
register.html — registration
dashboard.html — user dashboard
admin.html — admin/moderator panel
campaign-details.html
css/style.css
js/ — api, auth, campaigns, donations, guard
server.js — entry point
docker-compose.yml
Dockerfile
nginx/ — reverse proxy config
openapi.yaml — API spec
npm install
cp .env.example .env # edit with your values
npm run dev # starts on http://localhost:5000Needs MongoDB running locally or a connection string in .env.
| Variable | Description |
|---|---|
PORT |
Server port (default 5000) |
NODE_ENV |
development or production |
MONGODB_URI |
MongoDB connection string |
JWT_SECRET |
Secret for signing tokens |
JWT_EXPIRE |
Token expiry (e.g. 7d) |
EMAIL_HOST |
SMTP host |
EMAIL_PORT |
SMTP port |
EMAIL_USER |
SMTP user |
EMAIL_PASSWORD |
SMTP password / API key |
EMAIL_FROM |
Sender email address |
FRONTEND_URL |
For CORS |
Base URL: https://apex.maqsatto.tech/api
Full spec: openapi.yaml
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register |
| POST | /api/auth/login |
Login, returns JWT |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/campaigns |
— | List all (filter by status, category) |
| GET | /api/campaigns/:id |
— | Single campaign |
| POST | /api/campaigns |
admin/mod | Create |
| PUT | /api/campaigns/:id |
admin/mod | Update |
| DELETE | /api/campaigns/:id |
admin | Delete |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/donations/campaign/:id |
— | Campaign donations (public) |
| POST | /api/donations |
user | Create donation |
| GET | /api/donations |
user | My donations |
| GET | /api/donations/:id |
user | Single donation |
| DELETE | /api/donations/:id |
admin | Delete |
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /api/users/profile |
user | Get profile |
| PUT | /api/users/profile |
user | Update profile |
GET /api/health → { "success": true, "message": "API is running" }
All protected endpoints require Authorization: Bearer <token> header.
- user — browse, donate, manage own profile
- moderator — + create/edit campaigns
- admin — + delete campaigns/donations
The app runs on the server with Docker Compose (Node app + MongoDB + Nginx + Certbot for SSL).
docker compose up -d --buildSee docker-compose.yml and nginx/default.conf for config.
| Member | Role |
|---|---|
| Maqsat | Team Lead, DevOps & Backend |
| Bekzat | Backend Developer |
| Nazarbek | Frontend Developer |
| Raibek | Frontend Developer |
Contact: admin@maqsatto.tech
License: MIT




