Mini Jira v2 is a personal learning project focused on improving my backend and Next.js architecture skills.
This is not a full Jira clone.
The goal is to practice:
- Clean architecture
- BFF (Backend for Frontend) pattern
- Clear separation of responsibilities
- Runtime validation with Zod
- Server vs Client logic in Next.js
This project helps me understand how modern full-stack applications should be structured.
In this version, I focus on:
- UI does not access the database directly
- All data goes through
/app/api(BFF layer) - Clear separation between:
- HTTP layer
- Application logic
- Database access
- Shared contracts (schemas)
The main goal is writing clean, organized, and maintainable code.
- Next.js (App Router, Route Handlers, Server Components)
- React
- TypeScript
- MongoDB
- Mongoose
- Zod (validation and typed schemas)
- Tailwind CSS
- Docker (local database)
- Authentication (Auth.js)
- Unit tests (Jest)
- E2E tests (Playwright)
- OpenAPI documentation
app/
api/
projects/route.ts # HTTP endpoint (BFF)
projects/
page.tsx # Server Component (UI)
lib/
server/
db/ # Database connection
projects/
server/
service.ts # Application logic
repository.ts # Database queries
model.ts # Mongoose model
shared/
schemas.ts # Output DTOs (Zod)
inputs.ts # Input validation
client/
api.ts # Fetch wrapper for BFF
shared/
http/
helpers.ts # URL helpers
- Validates input
- Calls the service layer
- Returns structured responses
No business logic here.
- Handles use cases
- Transforms database data into DTOs
- Calculates pagination metadata
- Handles all database queries
- Applies pagination and sorting
- Ensures database connection
- Defines API contracts with Zod
- Types are generated from schemas
- Wraps fetch calls
- Validates responses
- Works in both Server and Client Components
- Paginated project list
- Sorting (name, createdAt, updatedAt)
- Query parameter handling
- Input validation
- Clean layered architecture
- Node.js
- Docker
docker compose up -dCreate a .env.local file:
MONGODB_URI=mongodb://127.0.0.1:27017/mini-jira
npm install
npm run dev