Skip to content
This repository was archived by the owner on Oct 31, 2026. It is now read-only.
ATemovaPublic archive

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

📚 BookFlow

A full-stack library web app built for the Systems III course: browse a book catalogue by category, rate and review books, and post library news with file attachments.

Status: finished. v1.0.0 is the final release and the project is no longer under active development.

Features

  • Accounts – sign up, log in, log out; passwords hashed with bcrypt; server-side sessions
  • Catalogue – browse books by category and sub-category, with search
  • Ratings & reviews – 1–5 star reviews per book; users can edit and delete only their own
  • News – logged-in users post news items with an optional file attachment
  • REST API – Express backend over MySQL

Tech stack

Layer Tech
Frontend React 18 (Create React App), axios
Backend Node.js, Express, express-session, multer, bcryptjs
Database MySQL / MariaDB (mysql2)

Project structure

back-end/
  index.js          Express app, session, CORS, /session, /logout
  db/dbConn.js      MySQL pool and queries
  db/schema.sql     Tables + seed books
  routes/           users, reviews, novice (news), upload
front-end/
  src/App.js        Navigation and views
  src/CustomComponents/

Running locally

Requirements: Node.js 18+, MySQL 8 or MariaDB 10.5+.

1. Database

mysql -u root -p -e "CREATE DATABASE bookflow; CREATE USER 'bookflow'@'localhost' IDENTIFIED BY 'change-me'; GRANT ALL ON bookflow.* TO 'bookflow'@'localhost';"
mysql -u root -p bookflow < back-end/db/schema.sql

2. Backend (port 5000)

cd back-end
cp .env.example .env
npm install
npm start

3. Frontend (port 3000)

cd front-end
cp .env.example .env
npm install
npm start

Single-server build

The backend serves a production build from back-end/build:

cd front-end && npm run build && cp -r build ../back-end/build
cd ../back-end && npm start

Each GitHub release also ships bookflow-<version>.tar.gz with the backend and the prebuilt frontend.

API

Method Endpoint Auth Description
POST /users/register Create account
POST /users/login Log in
GET /session Current session
POST /logout End session
GET /reviews/all-books List books
GET /reviews List reviews
POST /reviews ✔ Create, or update with currentCommentId
DELETE /reviews/:id ✔ Delete own review
GET /novice List news
GET /novice/:id One news item
POST /novice ✔ Create news (multipart, file)

Known limitations

  • The category catalogue is defined in the frontend, separate from the books table used for reviews.
  • No borrowing/return workflow or admin role.
  • Session cookies are not marked secure; run behind HTTPS and set it before any real deployment.

Author

Anastasija Temova – atemova.github.io

License

MIT

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages