Backend API service for the Social App project.
This service provides authentication, user management, and post-related endpoints.
Built with Express, Prisma ORM, and JWT-based authentication.
- Node.js
- Express.js
- Prisma ORM
- SQLite (Better-SQLite3 adapter)
- bcrypt (password hashing)
- JSON Web Token (JWT)
- dotenv
- CORS
- TypeScript
- tsx (dev runtime)
- Prisma CLI
- Faker (database seeding)
- User registration
- User login
- Password hashing with bcrypt
- JWT token generation & verification
- Protected routes
- Database schema management with Prisma
- Database seeding support
- CORS-enabled API access
social-app-api/ ├── prisma/ │ ├── schema.prisma │ └── seed.ts ├── index.ts ├── package.json └── .env
- git clone https://github.com/kaungmyatshwe1397/social-app-api.git
- cd social-app-api
- npm install
- Create a
.envfile: - DATABASE_URL="file:./dev.db"
- JWT_SECRET=your_secret_key
- npm prisma migrate dev
- npm run fresh
- Server runs by default at: http://localhost:8800;
- User registers → password hashed with bcrypt
- User logs in → JWT issued
- Client sends JWT in Authorization header
- Protected routes verify token before access
- Do not commit
.envfile - Ensure
JWT_SECRETis strong in production - Replace SQLite with production DB if deploying
This backend connects to:
https://github.com/kaungmyatshwe1397/social-app-client
Kaung Myat Shwe
GitHub: https://github.com/kaungmyatshwe1397