A high-performance, scalable backend API built with Bun, Fastify, and MongoDB.
- Fastify: A high-performance, low-overhead web framework for Node.js.
- MongoDB: A scalable NoSQL database with native TypeScript support.
- Bcrypt.js: A library for hashing passwords securely.
- Winston: A versatile logging library for Node.js.
- Zod: A TypeScript-first schema declaration and validation library.
- @fastify/jwt: JSON Web Token support for Fastify.
- @fastify/swagger: API documentation generation.
The DevQuiz API is deployed on Render: API Documentation
- Bun (latest version recommended)
- MongoDB instance
bun installbun devbun startOnce the server is running, access the Swagger UI:
http://localhost:3000/docs
Seed the database with an admin user and sample data:
bun run src/scripts/seed.tsRun the application and a MongoDB instance using Docker:
docker compose up --buildCheck for code quality issues:
bun eslint .Fix issues automatically:
bun eslint . --fixRun tests to verify functionality:
bun test