A full-stack web application for managing books, users, and reviews.
- Backend: Node.js, Express, MongoDB, Mongoose
- Frontend: Vue 3 (Composition API), Vite
- Authentication: JSON Web Tokens (JWT)
- Styling: SCSS
{
username: String,
password: String,
is_admin: Boolean,
created_at: Date
}{
title: String,
description: String,
author: String,
genres: [String],
image: String,
published_year: Number,
reviews: [ObjectId]
}{
name: String,
content: String,
rating: Number,
created_at: Date
}Method Endpoint Description Auth Required
- GET /users Retrieve all users ❌
- GET /users/:id Get a specific user by ID ❌
- PATCH /users/:id Update a user ✅
- DELETE /users/:id Delete a user ✅
- GET /books – Get all books
- GET /books/:id – Get a single book (with reviews)
- POST /books – Create a new book (auth required)
- PATCH /books/:id – Update a book (auth required)
- DELETE /books/:id – Delete a book (auth required)
- GET /reviews – Get all reviews
- GET /reviews/:id – Get a single review
- POST /reviews – Submit a review
- PATCH /reviews/:id – Update a review (auth required)
- DELETE /reviews/:id – Delete a review (auth required)
- 📖 Book List – Shows all books with title, image, and author
- 📄 Book Details – View book info and associated reviews
- ✍️ Review Form – Submit a review to a book
- 🔐 Login/Register – Authentication forms
- 🛡 Admin Panel – View all users (admin access only)
Create a .env file in the root of your backend folder with the following:
MONGODB_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
- MONGODB_URL: The connection string to your MongoDB database.
- JWT_SECRET: A secret key used to sign and verify JWT tokens.
Create a .env file in the root of your frontend folder with:
VITE_API_URL=http://localhost:3000/
Description:
- VITE_API_URL: The base URL for your backend API.
Change this to your production API URL when deploying.
This project was built in a group where we divided different areas:
- User system & authentication: @TeaGross Tea
- Books & admin view: @DulamaA Antonina
- Reviews: @amandawiktorsson Amanda
We collaborated closely to get the backend and frontend connected effectively.