Skip to content
/ book-app Public

A web-based book management application Built with Next.js (frontend) and AdonisJS (backend), using MySQL for data storage.

Notifications You must be signed in to change notification settings

Fruzh/book-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Book App

A web-based book management application
Built with Next.js (frontend) and AdonisJS (backend), using MySQL for data storage.

✨ Features

  • πŸ“– 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

πŸ› οΈ Tech Stack

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)

πŸ“‚ Project Structure

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

πŸš€ Getting Started

βœ… Prerequisites

Make sure you have the following installed:

  • Node.js (v18 or higher)
  • MySQL (v8.0 or higher)
  • Git
  • npm (comes with Node.js)

🧾 1. Clone the Repository

git clone https://github.com/Fruzh/book-app.git
cd book-app

πŸ›’οΈ 2. Set Up the MySQL Database

Create a database in MySQL (via phpMyAdmin or terminal):

CREATE DATABASE book_app;

Ensure your MySQL server is running and accessible.

πŸ”§ 3. Configure and Run the Backend

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=mysql

Install 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

🌐 4. Configure and Run the Frontend

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

🎯 5. Access the App

Visit: http://localhost:3000

πŸ§ͺ Testing the App

  • βœ… 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

About

A web-based book management application Built with Next.js (frontend) and AdonisJS (backend), using MySQL for data storage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published