Skip to content

BF-BackEnd-class-2025/java-week-12

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Week 12: Final Project

This week is dedicated to designing, building, and presenting your own REST API backend project. You will apply everything learned in Weeks 1–11, including:

  • Backend architecture (Controller → Service → Repository)
  • DTOs & input validation
  • Database persistence (PostgreSQL recommended)
  • Authentication & authorization (JWT)
  • Clean code, documentation, and testing practices

Have a look at tasks project


🎯 Learning Objectives

By the end of this week, you will be able to:

Skill Description
Design an API Define resources, endpoints, request/response shapes
Work with a real database Use PostgreSQL to store persistent data
Implement secure authentication Use JWT-based authentication to protect routes
Apply validation & error handling Ensure clean input and consistent error messages
Document and present your work Explain your architecture and design choices

🧱 Project Requirements

Your final project must include:

✅ 1. At least one main resource

Examples:

  • Notes
  • Blog posts
  • Products
  • Events
  • Movies
  • Projects & tasks
  • Recipes
  • Contacts

✅ 2. Full CRUD Operations

Action HTTP Example
Create POST /api/items
Read (list + detail) GET /api/items & /api/items/{id}
Update PATCH/PUT /api/items/{id}
Delete DELETE /api/items/{id}

✅ 3. Authentication (JWT)

  • POST /auth/register
  • POST /auth/login
  • Protected routes must require:
Authorization: Bearer <token>

✅ 4. Database Storage

  • Use PostgreSQL
  • Use Spring Data JPA

✅ 5. DTOs + Validation

  • Request DTOs for input
  • Response DTOs for output
  • Use validation annotations (@NotBlank, @Email, etc.)

✅ 6. Global Error Handling

  • Return clean JSON error responses

✅ 7. README Documentation

Your README should include:

  • Project overview
  • ERD / Data models
  • API routes table
  • Instructions to run the project

🏗 Recommended Project Structure (same as Tasks Project)

final-project/
├── controller/         # Handles requests
├── service/            # Business logic
├── repository/         # Database access
├── mapper/             # DTO <-> Entity mapping
├── dto/                # Request & response DTOs
├── model/              # JPA entities
├── security/           # JWT + password hashing
├── exception/          # Global error handler

Refer to Week 11 Tasks Project for full working examples of:

  • User registration and login
  • SecurityConfig + JwtAuthenticationFilter
  • DTO validation
  • Error handling format

🧪 Testing Requirements

You should be able to demonstrate:

  • Register a new user
  • Login & receive JWT token
  • Make authenticated requests to protected endpoints
  • CRUD operations working as expected

📚 Suggested Project Ideas

Project Idea Description
Expense Tracker Track user spending categories & totals
Fitness Tracker Log workouts, calories, and exercise notes
Book Collection Users store and review books they’ve read
Recipe Manager Save ingredients, instructions, meal tags
Movie Watchlist Track movies watched / wishlist
Notes App Personal notes with tags or folders

You may build your own idea — but it must meet the requirements above.


🎤 Final Presentation / Demo

Your demo should include:

  1. Brief project overview (1–2 minutes)

  2. Show your PostgreSQL tables

  3. Use Postman to demonstrate:

    • Register & Login
    • Authenticated CRUD API calls
  4. Explain one technical decision (e.g., DTO structure, service layer design)


✅ End-of-Week Deliverables

Deliverable Description
GitHub Repo Code pushed and clean
README.md Clear instructions & documentation
Database Running PostgreSQL working
Demo Presentation Ready to present your API

🏁 Goal

By the end of Week 12, you will have built a real, secure backend application, ready to show in job interviews and portfolios.

This week is your capstone — build something you are proud of 🚀


About

Java Week 12

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages