nya1 /
rest-api-boilerplate
Typescript-based REST API boilerplate with full integration tests
37/100 healthLoading repository data…
chigemezu2202 / repository
A TypeScript-based backend API for classroom and course management, built with Express, Drizzle ORM, and PostgreSQL. Supports secure RESTful endpoints for managing subjects and departments with advanced filtering, pagination, and relational queries. Ideal for academic and school information systems needing robust, scalable data services.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A robust and scalable TypeScript Express backend API for managing classroom subjects and departments. Built with modern technologies including Express.js, Drizzle ORM, and PostgreSQL, this API provides comprehensive endpoints for educational institution management.
| Technology | Version | Purpose |
|---|---|---|
| Node.js | Latest LTS | Runtime environment |
| Express.js | ^5.2.1 | Web framework |
| TypeScript | ^6.0.2 | Type-safe development |
| Drizzle ORM | ^0.45.2 | Database ORM |
| PostgreSQL | Via Neon | Database (serverless) |
| Neon Serverless | ^1.0.2 | Database client |
| CORS | ^2.8.6 | Cross-origin support |
| dotenv | ^17.3.1 | Environment configuration |
Selected from shared topics, language and repository description—not editorial ratings.
nya1 /
Typescript-based REST API boilerplate with full integration tests
37/100 healthFreemius /
Official JavaScript/TypeScript based Backend SDK for Freemius API, plus a Shadcn-based SaaS starter kit for rapid app development and integration.
66/100 healthchtgupta /
git clone https://github.com/chigemezu2202/classroom-backend.git
cd classroom-backend
npm install
Create a .env file in the root directory with the following variables:
DATABASE_URL=your_neon_database_url_here
PORT=3000
FRONTEND_URL=http://localhost:5173
Note: The FRONTEND_URL defaults to http://localhost:5173 if not specified.
Generate and run database migrations:
npm run db:generate # Generate migration files
npm run db:migrate # Apply migrations to database
npm run db:seed # Seed initial data (optional)
npm run dev
The server will start and listen on the port specified in your .env file (default: 3000).
Output:
Server started and listening on http://localhost:3000
| Command | Description |
|---|---|
npm run dev | Start development server with hot reload (tsx watch) |
npm run build | Compile TypeScript to JavaScript |
npm start | Run compiled production build |
npm run db:generate | Generate Drizzle ORM migration files |
npm run db:migrate | Execute pending database migrations |
npm run db:seed | Seed database with initial data |
npm test | Run test suite |
http://localhost:3000/api
GET /
{ message: "Hello from TypeScript Express server!" }GET /api/subjects
Retrieve all subjects with advanced filtering, search, and pagination capabilities.
Query Parameters:
search (optional, string): Search subjects by name or code (case-insensitive)department (optional, string): Filter by department name (case-insensitive)page (optional, number): Page number (default: 1, minimum: 1)limit (optional, number): Items per page (default: 10, maximum: 100)Example Request:
GET /api/subjects?search=mathematics&department=science&page=1&limit=10
Response:
{
"data": [
{
"id": 1,
"departmentId": 2,
"name": "Calculus",
"code": "MATH101",
"description": "Introduction to Calculus",
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T10:30:00Z",
"department": {
"id": 2,
"code": "SCI",
"name": "Science",
"description": "Science Department",
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T10:30:00Z"
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 25,
"totalPages": 3
}
}
Status Codes:
200 OK: Successfully retrieved subjects500 Internal Server Error: Server error occurred| Column | Type | Constraints |
|---|---|---|
id | Integer | Primary Key, Auto-generated |
code | VARCHAR(50) | NOT NULL, UNIQUE |
name | VARCHAR(255) | NOT NULL |
description | VARCHAR(255) | - |
created_at | Timestamp | NOT NULL, Default: now() |
updated_at | Timestamp | NOT NULL, Auto-updated |
| Column | Type | Constraints |
|---|---|---|
id | Integer | Primary Key, Auto-generated |
departmentId | Integer | NOT NULL, Foreign Key (departments.id) |
name | VARCHAR(255) | NOT NULL |
code | VARCHAR(50) | NOT NULL, UNIQUE |
description | VARCHAR(255) | - |
created_at | Timestamp | NOT NULL, Default: now() |
updated_at | Timestamp | NOT NULL, Auto-updated |
Relationships:
The API is configured with CORS to allow frontend applications to make requests:
Allowed Origins:
FRONTEND_URL env variablehttp://localhost:5173 (Vite development server)Allowed Methods: GET, POST, PUT, DELETE
Credentials: Enabled
Configure the FRONTEND_URL in your .env file to restrict API access to authorized frontend domains.
classroom-backend/
├── src/
│ ├── index.ts # Express app initialization
│ ├── db/
│ │ ├── index.ts # Database client configuration
│ │ └── schema/
│ │ ├── index.ts # Schema exports
│ │ └── app.ts # Database tables & relationships
│ └── routes/
│ └── subjects.ts # Subjects API endpoints
├── drizzle/ # Database migrations
├── drizzle.config.ts # Drizzle ORM configuration
├── tsconfig.json # TypeScript configuration
├── package.json # Project dependencies
├── .env # Environment variables (gitignored)
├── .env.example # Example environment variables
└── README.md # This file
/api/subjects)The API includes comprehensive error handling:
src/npm run devnpm run build| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | ✅ Yes | - | PostgreSQL connection string (Neon format) |
PORT | ❌ No | 3000 | Server port |
FRONTEND_URL | ❌ No | http://localhost:5173 | Allowed CORS origin |
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the ISC License - see the package.json file for details.
For issues, questions, or suggestions, please open an issue on the GitHub repository.
Last Updated: May 2026
Version: 1.0.0
git clone https://github.com/chigemezu2202/classroom-backend.git
cd classroom-backend
npm install
.env file:
PORT=your_port
MONGO_URI=your_mongo_uri
JWT_SECRET=your_jwt_secret
npm start
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users | Retrieve all users |
| POST | /api/users/register | Register a new user |
| POST | /api/users/login | User login |
| GET | /api/courses | Retrieve all courses |
| POST | /api/courses | Create a new course |
| PUT | /api/courses/:id | Update a course |
| DELETE | /api/courses/:id | Delete a course |
{ id, username, password, email, created_at }{ id, title, description, created_by, created_at }{ id, title, description, due_date, course_id }const cors = require('cors');
app.use(cors({
origin: 'your_origin',
methods: 'GET,POST,PUT,DELETE',
}));
classroom-backend/
├── config/ # configuration files
├── controllers/ # request handlers
├── models/ # database models
├── routes/ # API endpoints
├── middleware/ # authentication middleware
├── utils/ # utility functions
└── server.js # entry point
try-catch blocks to handle errors.A TypeScript-based tool that simplifies the creation and management of mock APIs for your development and testing needs
MAHIR-DEVES /
A TypeScript-based authentication backend using PostgreSQL and JWT. Includes secure login, registration, profile API, role-based authorization, and modular architecture for scalable backend development.
43/100 healthhitoriiiiiiii /
Teams-CLI is a TypeScript-based command-line tool for managing teams and GitHub repositories, with GitHub API integration, repository analytics, and Prisma-powered database support.
59/100 healthGainium /
TypeScript-based crypto trading platform backend with automated DCA, Grid, Combo, and Hedge bot strategies, real-time WebSocket streaming, backtesting capabilities, and GraphQL API for portfolio management.
48/100 health