A personal PDF book library built with Next.js.
- Upload and store PDF books
- Search by title or author
- View PDFs in browser
- Download books
- Delete books from library
- Responsive design
npm run devOpen http://localhost:3000.
npm run build
npm start-
Build the application:
npm run build
-
Copy
nginx.confto/etc/nginx/sites-available/books-archive -
Update the config:
- Replace
your-domain.comwith your domain - Update
/path/to/books-archive/public/books/with the actual path
- Replace
-
Enable the site:
sudo ln -s /etc/nginx/sites-available/books-archive /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx
-
Start the Next.js server:
npm start
For production, use PM2:
npm install -g pm2 pm2 start npm --name "books-archive" -- start pm2 save pm2 startup
├── data/ # Book metadata storage (books.json)
├── public/books/ # Uploaded PDF files
├── src/
│ ├── app/
│ │ ├── api/books/ # API routes
│ │ └── page.tsx # Main page
│ ├── components/ # React components
│ └── lib/ # Utilities and types
└── nginx.conf # Nginx configuration