https://github.com/x-name15/APIs-Collection-with-TS
basic-apiCRUD-ts-mongodb
https://github.com/x-name15/APIs-Collection-with-TS
api mongodb postman typescript
Last synced: 3 months ago
JSON representation
basic-apiCRUD-ts-mongodb
- Host: GitHub
- URL: https://github.com/x-name15/APIs-Collection-with-TS
- Owner: x-name15
- Created: 2025-03-06T10:21:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T10:59:41.000Z (about 1 year ago)
- Last Synced: 2025-03-06T11:33:27.881Z (about 1 year ago)
- Topics: api, mongodb, postman, typescript
- Language: TypeScript
- Homepage:
- Size: 14.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎬 APIs-Collection-with-TS
This is a **Movie API Collection** built with **TypeScript**, using different setups for **MongoDB** and **PostgreSQL**.
---
## 👋 Hey, welcome back mate!
This project is a small collection of APIs — well, technically **one Movie API**, but implemented in **different ways** using various database engines and tools.
The goal is to show **how the same concept can evolve** across setups, from a simple CRUD to a more complete and structured API.
---
## 🌿 Branches and Levels
The repository is divided into **branches** and **directory levels**, to help you explore each version of the API progressively:
### 🧠 Branches
- **`main`**
This is the “lobby” of the project.
It only contains:
- General documentation (this README)
- The `.env.example` file
- A small txt witht the general npm packages used on this project
- **`mongoose`**
Contains the Movie API built with **MongoDB + Mongoose**.
Inside this branch, you’ll find folders such as:
- `api_basica/` → A minimal CRUD setup using Express and Mongoose
- `api_intermedia/` → Adds validations, better structure, and new npm packages
- `api-with-consumer/` → A variant API with a consumer using RabbitMQ for this task
- **`prisma`**
Contains the Movie API built with **PostgreSQL + Prisma ORM**.
Inside this branch:
- `api_basica_nodemon/` → Basic CRUD example with Prisma
---
## 🗂️ File Structure
Here’s a visual overview of how the project is structured (mostly):

Each branch keeps its own folder organization, so you can switch between them and test independently.
---
## ⚙️ Things to Keep in Mind
- All setups use **dotenv** to protect credentials.
Yes, it’s a bit overkill for local environments — but hey, it’s good habit.
- The **data format** for each movie document is:
```json
{
"title": "string",
"director": "string",
"year": number,
"genres": ["string", "string"]
}