Loading repository dataβ¦
Loading repository dataβ¦
jorgeadev / repository
π¬ A robust, scalable, and fully type-safe backend RESTful API built with Node.js, Express, and MongoDB for efficiently managing movie collections, featuring strict TypeScript typings, an MVC architecture, and an automated testing suite.
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, scalable, and fully type-safe RESTful API for managing your movie collections.
Built with modern architecture, engineered for performance.
Movie API is a complete backend service designed to handle a movie library's CRUD (Create, Read, Update, Delete) operations. It seamlessly leverages the power of MongoDB coupled with Mongoose ORM for intelligent schema validation, all wrapped entirely in strict TypeScript for bulletproof confidence on both compilation and runtime levels.
proxyquire and Mocha.cors integration to talk with any frontend.The service takes advantage of an enterprise-level modularized backend stack.
| Technology | Purpose |
|---|---|
| Node.js + Express | High-performance core HTTP Server |
| TypeScript | Advanced static type checking & compiling |
| MongoDB + Mongoose | NoSQL Database handling with structural schema validations |
| Mocha + Supertest | Automated end-to-end routing testing |
The base URL for all endpoints is /api/movies.
| Method | Endpoint | Description | HTTP Status Return |
|---|---|---|---|
GET | / | Retrieve all movies in the database | 200 OK |
GET | /:movieId | Fetch detail for a specific movie by ID | 200 OK |
POST | / | Create a new movie entry | 201 Created |
PUT | /:movieId | Modify an existing movie | 200 OK |
DELETE | /:movieId | Delete a movie permanently | 200 OK |
Request Body (POST /api/movies):
{
"title": "Crime at Porta Romana",
"year": "1999",
"cover": "http://example.com/cover.jpg",
"duration": "237",
"contentRating": "C",
"tags": ["Adventure", "Comedy"]
}
Successful Response Format:
{
"data": "ca309ed7-1aeb-4201-b2a4-2386dba194f0",
"message": "Movie created successfully!"
}
Follow these steps to deploy a developmental environment locally.
1. Clone & Install Dependencies:
# Clone the repository
git clone https://github.com/jorgeadev/movie-api
# Jump to the project directory
cd movie-api
# Install required packages
pnpm install
2. Configure your Environment Variables
Generate a .env file at the root of your project:
PORT=3000
DB=mongodb+srv://<USERNAME>:<PASSWORD>@cluster.mongodb.net/movies?retryWrites=true&w=majority
3. Boot the Server! Run the typescript-node developer service directly with Hot-Reloads:
pnpm dev
The codebase includes full mock-powered routing tests avoiding actual MongoDB mutations.
To execute the test suite:
pnpm test
Note: Tests compile safely through
ts-node/registerhandling standard CommonJS proxy wiring environments perfectly.