A full-stack web application that allows authenticated users to manage their personal book collections. Built with modern technologies including React, NestJS, TypeORM, and PostgreSQL.
- User registration and login with JWT authentication
- Secure route protection
- Token-based session management
- Password hashing with bcrypt
- Create, read, update, and delete personal books
- User-specific book collections
- Input validation and error handling
- JWT token authentication
- Protected API endpoints
- User data isolation
- Input sanitization and validation
- React 18 – Modern React with hooks
- TypeScript – Type-safe JavaScript
- Axios – HTTP client for API requests
- Tailwind CSS – Utility-first CSS framework
- React Router – Client-side routing
- NestJS – Progressive Node.js framework
- TypeORM – Object-relational mapping
- PostgreSQL – Relational database
- JWT – JSON Web Token authentication
- bcrypt – Password hashing
- class-validator – Input validation
git clone https://github.com/your-username/mini-book-shelf.git
cd mini-book-shelfcd backend npm install `` Create a .env file in the backend directory:
DATABASE_URL=postgres://your_db_user:your_db_pass@localhost:5432/your_db_name
JWT_SECRET=your_jwt_secretRun migrations and start the backend:
npm run start:devcd ../frontend
npm install
# or
yarn installCreate a .env file in the frontend directory:
VITE_API_URL=http://localhost:3000Start the frontend:
npm run dev-
Improved NestJS Proficiency: Gained deeper understanding of modules, services, and guards in NestJS.
-
Mastered JWT Authentication in NestJS: Learned how to securely implement token-based auth, and integrate it with protected endpoints.
-
Explored TypeORM: Learned how to define entities, relationships, and handle queries using the repository pattern.
-
Overcame Axios + JWT Challenges: Dealt with tricky bugs related to missing or invalid tokens, ensuring proper Axios interceptor behavior and secure session handling.