A simple social media API built with Node.js, TypeScript, Express, and Prisma. Features include user management, posts, and comments with soft-delete functionality. It was containerized using Docker for consistent development and deployment.
- CRUD operations for Users, Posts, and Comments
- Soft-delete support with
onlyDeleted
andincludeDeleted
query params - Swagger API documentation at
/api-docs
This project uses Docker containers for both the application and PostgreSQL database. Follow these steps to get started locally:
- Clone the repo:
git clone https://github.com/copstud3/post-it-app.git
- Install dependencies:
npm install
- Set up environment: Setup
.env
using.env.example
and configure your PostgreSQL database. - Run Docker Compose: Starts the app and database in containers.
docker-compose up --build
- Apply migrations: In a new terminal, run:
docker-compose exec app npx prisma migrate dev
- Access the app: Visit
http://localhost:3000
and Swagger docs athttp://localhost:3000/api/v1/docs
.
For local development without Docker, use npm run dev after setting up a local PostgreSQL instance.
main
: Production-ready code (merged fromdevelop
via PR).develop
: Development integration (merged from feature branches via PR).
- ERD: View Diagram
- Interactive Diagram: dbdiagram.io Link
Explore the API at http://localhost:3000/api/v1/docs
after starting the server.
- New features/fixes: Create a
feature/<name>
branch fromdevelop
. - PR to
develop
, thendevelop
tomain
after review.
- main: Production branch; merged from
develop
via PR. - develop: Development branch; merged from feature branches via PR.
- Feature Branches: Create
feature/<name>
fromdevelop
for new work. - Commit Messages: Use
feat:
,fix:
,docs:
, etc.
- Node.js
- TypeScript
- Express
- Prisma (PostgreSQL)
- Swagger (OpenAPI)