A campus freelance marketplace connecting university clients with student freelancers, built for CSE322 Software Engineering (Alexandria University).
unigig/
├── .github/workflows/ # Independent CI pipelines (backend-ci.yml & frontend-ci.yml)
├── unigig-backend/ # Java 25 / Spring Boot 4.1 REST API (Flyway + PostgreSQL 17)
├── unigig-frontend/ # Angular 20 Zoneless SPA + Tailwind CSS v4 (Node 22/24)
├── docker-compose.yml # Local PostgreSQL 17 database container
├── CONTRIBUTING.md # Team Agile & Git workflow rules
└── README.md
- Stateless JWT Security: BCrypt password hashing (
BCryptPasswordEncoder) and HMAC-SHA256 JWT tokens containingsub(email),userId, androle(FREELANCERorCLIENT). POST /api/auth/register— Creates aFREELANCERorCLIENTaccount and returns201 Createdwith anAuthResponse(token,id,fullName,email,role). Returns409 Conflictif the email is already registered.POST /api/auth/login— Authenticates credentials and returns200 OKwith anAuthResponseor401 Unauthorizedon invalid credentials.
GET /api/profiles/me— Returns the authenticated freelancer'sFreelancerProfileResponse(200 OKor404 Not Found).PUT /api/profiles/me— Creates or updates the authenticated freelancer's profile (title,bio, up to 25 deduplicatedskills,portfolioUrl). Restricted toFREELANCERaccounts (403 Forbiddenfor clients).GET /api/profiles/{userId}— Publicly readable endpoint to view a freelancer's profile by user ID.
GET /api/categories— Returns the seeded campus gig categories (Web Development,Mobile Development,Graphic Design,Writing & Translation,Video & Audio,Data & Analytics,Tutoring,Other) sorted alphabetically.POST /api/gigs— Allows authenticatedCLIENTusers to post a new gig (title,description,categoryId) with initial statusOPEN(201 Created, or403 Forbiddenfor freelancers).GET /api/gigs— Paginated marketplace search (10items per page, ordered newest first) returningOPENgigs filtered optionally bykeyword(case-insensitive match on title or description) andcategoryId.
/(Home) — Displays the UniGig campus landing page for unsigned visitors and automatically renders the Gig Marketplace (<app-marketplace />) when signed in./auth/login&/auth/register— Reactive authentication forms with inlineApiErrorvalidation feedback./marketplace(Marketplace) — Keyword search, category dropdown filter, pagination controls, and Post Gig action button (canActivate: [authGuard])./gigs/new(PostGig) — Validated reactive form for clients to publish a new campus gig (canActivate: [authGuard])./profile(ProfileShell) &/profile/:userId(FreelancerProfile) — Role-aware profile view and skill/portfolio editor (canActivate: [authGuard]).
- Branches:
devis the active integration branch;mainholds tested milestone releases. - Feature Branches: Always branch off
devusing the Jira ticket key:feat/UG-<id>-short-descriptionfix/UG-<id>-short-description
- Pull Requests: Target
devand includeUG-<id>in the PR title to link Jira automatically. BothBackend CIandFrontend CImust pass before merging.
- Docker Desktop (runs PostgreSQL without native DB setup)
- JDK 25 (Temurin / Oracle)
- Node.js 22+ LTS & Angular CLI (
npm install -g @angular/cli)
From the repository root:
docker compose up -d(Starts unigig-postgres on localhost:5432 — database unigig, user/password postgres.)
Ensure unigig-backend/src/main/resources/application.properties points to localhost:5432/unigig with spring.flyway.enabled=true and spring.jpa.hibernate.ddl-auto=validate, then run:
cd unigig-backend
./mvnw spring-boot:run- API Base URL:
http://localhost:8080 - Tests / JAR Build:
./mvnw test|./mvnw clean package
cd unigig-frontend
npm install
npm start- App URL:
http://localhost:4200(proxies/apirequests tohttp://localhost:8080viaproxy.conf.json) - Production Build:
npx ng build --configuration production
Everyone runs their own local PostgreSQL (docker compose up -d) and loads the same test data with the shared-dev Spring profile.
Mac / Linux / Git Bash:
docker compose up -d
cd unigig-backend
export SPRING_PROFILES_ACTIVE=shared-dev
./mvnw spring-boot:runWindows PowerShell:
docker compose up -d
cd unigig-backend
$env:SPRING_PROFILES_ACTIVE="shared-dev"
.\mvnw.cmd spring-boot:runThe profile loads db/dev-seed/R__shared_dev_seed.sql, a repeatable and idempotent seed that is not loaded by default, in tests, or in CI. To get a clean copy of the data: docker compose down -v && docker compose up -d.
Seeded accounts (test-only password Password123!): admin@unigig.test (CLIENT, the quick-login account for smoke testing), client1@unigig.test and client2@unigig.test (CLIENT), freelancer1@unigig.test and freelancer2@unigig.test (FREELANCER). The seed also contains 14 OPEN gigs (more than one page) plus IN_PROGRESS, COMPLETED and CANCELED gigs that must not appear in the marketplace.
Never add real data or real credentials to the seed file.
| Package | Responsibility |
|---|---|
controller/ |
REST endpoints (AuthController, ProfileController, GigController, CategoryController) & @Valid request binding |
dto/ |
Immutable Java record request/response contracts |
service/ |
Business rules, role checks (FREELANCER vs CLIENT), and @Transactional boundaries |
repository/ |
Spring Data JPA interfaces & JPQL marketplace search queries |
entity/ |
JPA @Entity classes (User, FreelancerProfile, Gig, Category) & enums (UserRole, GigStatus) mapped to Flyway migrations V1–V4 |
config/ |
Stateless JWT SecurityConfig filter chain and BCryptPasswordEncoder |
security/ |
JwtService token signing/parsing and JwtAuthenticationFilter |
exception/ |
GlobalExceptionHandler (@RestControllerAdvice) mapping errors to ErrorResponse JSON |
See unigig-backend/CONVENTIONS.md for detailed backend rules.
| Folder | Responsibility |
|---|---|
core/ |
AuthService, functional authInterceptor & authGuard, domain services (GigService, ProfileService), and strict 1-to-1 wire models (core/models/) |
features/ |
Standalone Signal-driven page views (home, auth, marketplace, gigs, profile) |
shared/ |
Reusable UI components (navbar) |
See unigig-frontend/CONVENTIONS.md for detailed frontend rules.
The REST API boundary between unigig-backend (com.unigig.backend.dto and domain enums) and unigig-frontend (src/app/core/models/) enforces a strict 1-to-1 contract.
- Exact Structural Parity: Every TypeScript interface or type in
core/models/*.models.tsmust mirror its corresponding backend Java DTO record or enum—matching exactcamelCaseproperty names, JSON-compatible types (Long→number, ISO timestamps →string), optionality, and uppercase enum string literals. - No Unbacked Wire Fields: Frontend model files represent pure HTTP wire contracts. Any UI-only or derived display state belongs in component state or view-models, never inside
core/models/. - Coordinated Changes: Any modification to a backend DTO or a frontend model must update its counterpart before merging into
dev.