A full-stack web application for managing and browsing a personal book library, built with Next.js, TailwindCSS, Prisma, and MongoDB.
- Book Library — Browse, search, and download books with cover thumbnails and summaries
- Blog — MDX-powered blog with tag filtering, pagination, and Giscus comments
- Authentication — User sign-in and sign-up via Clerk
- Store & Accounts — Commodity and account management pages
- Search — KBar-powered command palette search
- Dark/Light Theme — System-aware theme switching
- GraphQL API — Powered by graphql-yoga and Pothos
| Layer | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript |
| Styling | TailwindCSS |
| Database | MongoDB (via Prisma) |
| Auth | Clerk |
| API | GraphQL (graphql-yoga + Pothos) |
| HTTP | Axios |
yarnOn Windows, you may need to run
set PWD="$(pwd)"first.
Create a .env file at the project root and set:
DATABASE_URL=mongodb://...
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=...
CLERK_SECRET_KEY=...yarn devOpen http://localhost:3000 in your browser.
yarn build
yarn serve| File | Purpose |
|---|---|
data/siteMetadata.js |
Site title, URL, social links, analytics, comments config |
tailwind.config.js |
Tailwind theme and plugin settings |
next.config.js |
Next.js config including Content Security Policy |
prisma/schema.prisma |
Database schema (books, users, stores, accounts, etc.) |
Build and push the image:
docker build -t huangchong/galiang:latest .
docker push huangchong/galiang:latestRun with NAS volume mounts:
docker run -d \
-p 3000:3000 \
--mount type=bind,source=/volume2/library/books,target=/Users/huangchong/SynologyDrive/books/ \
--mount type=bind,source=/volume2/library/thumbnail,target=/usr/src/app/public/thumbnail \
huangchong/galiangapp/
Main.tsx # Home page (book carousel + list)
blog/ # Blog pages
store/ # Store management
account/ # Account management
components/ # Shared UI components
api/ # API routes (books, download, search, etc.)
data/ # Site metadata and blog content
layouts/ # Page layout templates
prisma/ # Database schema and generated types
public/ # Static assets and book thumbnails
ISC