Skip to content

darunbjork/devquiz-api

Repository files navigation

DevQuiz API

A high-performance, scalable backend API built with Bun, Fastify, and MongoDB.

Key Libraries

  • 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.

Production Deployment

The DevQuiz API is deployed on Render: API Documentation


Quick Start

Prerequisites

  • Bun (latest version recommended)
  • MongoDB instance

Installation

bun install

Development Server

bun dev

Production Build

bun start

API Documentation

Once the server is running, access the Swagger UI: http://localhost:3000/docs


Database & Docker

Seeding Data

Seed the database with an admin user and sample data:

bun run src/scripts/seed.ts

Docker Compose

Run the application and a MongoDB instance using Docker:

docker compose up --build

Code Quality & Testing

ESLint

Check for code quality issues:

bun eslint .

Fix issues automatically:

bun eslint . --fix

Testing

Run tests to verify functionality:

bun test

About

A high-performance, scalable backend API built with Bun, Fastify, and MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors