A production‑ready RESTful API for user authentication and profile management. Built with Next.js 16 (App Router), TypeScript, Prisma ORM, PostgreSQL, and JWT authentication. Includes full CRUD operations, password hashing (bcrypt), input validation (Zod), and comprehensive testing (unit, integration, system). CI/CD pipeline automates testing via GitHub Actions.
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Database | PostgreSQL + Prisma ORM |
| Authentication | JWT (jose) |
| Password Hashing | bcryptjs |
| Validation | Zod |
| Testing | Jest + Supertest |
| CI/CD | GitHub Actions |
| API Documentation | Postman Collection |
- Node.js 20+
- PostgreSQL (local or cloud)
Step Tools / Actions
- Scaffold --- npx create-next-app@latest --typescript --tailwind + npm install prisma @prisma/client bcryptjs jose zod
- Database --- npx prisma init --datasource-provider sqlite (skip PostgreSQL – no server needed)
- Schema --- Copy a standard User model with id, email, password, name
- Auth helpers --- Write hashPassword, comparePassword, generateToken, verifyToken using bcryptjs + jose
- API routes --- Write register, login, users/me (GET, PUT, DELETE) – copy‑paste from a boilerplate
- Validation --- Add Zod schemas for each endpoint
- Tests --- Write one unit test (validation), one integration test (/register), one system test (full flow) – reuse existing patterns
- CI/CD --- Copy a GitHub Actions workflow that uses a PostgreSQL service container (or SQLite in‑memory)
- README + Postman --- Export a Postman collection, write a minimal README with endpoints and setup
- Defect log --- List 3–4 bugs you fixed (e.g., “JWT secret missing”, “Prisma provider mismatch”)
# Clone the repository
git clone https://github.com/Nsereko1/SoftwareGroupTestProject.git
cd SoftwareGroupTestProject
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your database URL and JWT secret
# Run database migrations
npx prisma migrate dev
# Start the development server
npm run dev
team members
bukenya glenn matthew
busulwa peter
asasira queen pinklen
ampumuza recheal
lukoda fahad