Dev Academy REST API is a Node.js RESTful API designed to manage educational resources in an academy.
It provides full CRUD functionality for:
- 👩🎓 Users
- 🏫 Bootcamps
- 📘 Courses
- ⭐ Reviews
- Swagger UI:
http://localhost:3000/api-docs - Postman Collection: Use the provided JSON file in the project.
✔ JWT Authentication – Secure login & session handling
✔ Password Hashing with bcryptjs
✔ RBAC (Role-Based Access Control)
✔ Password Recovery (Forgot & Reset Password)
✔ Email Notifications with nodemailer
✔ Server-Side Validation using express-validator
✔ Advanced MongoDB Queries & Aggregations
✔ Pagination for large datasets
✔ Image Uploads via express-fileupload
✔ SEO-Friendly URLs using slugify
✔ Rate Limiting with express-rate-limit
✔ Mongoose Hooks (pre & post save/update)
- Clone the repository
git clone https://github.com/carpodok/dev-academy-rest-api.git- Navigate to the project directory:
cd dev-academy-rest-api- Install required dependencies
npm install- Creat a
.envfile on the root of the project and add the following environment variables. To set up email host informations visit Mailtrap and create your account.
NODE_ENV=development
PORT=3000
MONGO_URI=<your-mongo-uri>
FILE_UPLOAD_PATH= ./public/uploads
MAX_FILE_UPLOAD=1000000
JWT_SECRET=<your-jwt-secret>
JWT_EXPIRE=30d
JWT_COOKIE_EXPIRE=30
// Set up with your own configurations
SMTP_HOST=sandbox.smtp.mailtrap.io
SMTP_PORT=
SMTP_EMAIL=
SMTP_PASSWORD=
[email protected]
FROM_NAME=Dev Academy
- To seed the database with users, bootcamps, courses and reviews with data from the "_data" folder, run
# Destroy all data
node seeder -d
# Import all data
node seeder -i
- To start the server, run the following command on the root of the project path;
npm start
For the development purpose;
npm run dev
- The application will be running on
http://localhost:3000
This project is licensed under the MIT License.