A web-based book management application
Built with Next.js (frontend) and AdonisJS (backend), using MySQL for data storage.
- π Add, edit, view, and delete books with details like:
- Title
- Author
- Category
- Description
- Content
- Cover Image
- πΈ Image upload support for book covers
- π Real-time notifications on user actions
- π± Responsive design for desktop and mobile
| Layer | Technology |
|---|---|
| Frontend | Next.js 14.2.15, React, Tailwind CSS |
| Backend | AdonisJS 6.0.0 |
| Database | MySQL 8.0.39 |
| Utilities | Formidable (file uploads), Nanoid (unique filenames) |
book-app/
βββ backend/ # AdonisJS backend
β βββ app/ # Controllers, models, validators
β βββ database/ # Migrations and seeds
β βββ .env.example # Environment config template
βββ frontend/ # Next.js frontend
β βββ src/ # Pages, components, API routes
β βββ public/ # Static assets (e.g., uploads/)
βββ README.md # Project documentation
Make sure you have the following installed:
- Node.js (v18 or higher)
- MySQL (v8.0 or higher)
- Git
- npm (comes with Node.js)
git clone https://github.com/Fruzh/book-app.git
cd book-app
Create a database in MySQL (via phpMyAdmin or terminal):
CREATE DATABASE book_app;Ensure your MySQL server is running and accessible.
cd backend
cp .env.example .env
Edit .env and update your MySQL credentials:
PORT=3333
HOST=localhost
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=your_username
DB_PASSWORD=your_password
DB_DATABASE=book-app
DB_CONNECTION=mysqlInstall dependencies and run migrations:
npm install
node ace generate:key
node ace migration:run
node ace db:seed
node ace serve --watchπ Backend will run at: http://localhost:3333
Open a new terminal tab/window, install dependencies and start the frontend:
cd frontend
npm install
npm run devπ Frontend will run at: http://localhost:3000
Visit: http://localhost:3000
- β
Add a Book:
/books/add - βοΈ Edit a Book:
/books/[id] - β Delete a Book: Delete button on the detail/edit page
- π Uploads: Check
frontend/public/uploads/for images