Skip to content
/ ebook Public
forked from msanchariii/ebook

A Next.js web app to buy and read e-Books & e-Magazines.

Notifications You must be signed in to change notification settings

s0umi/ebook

 
 

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Routes:

/ : Home (Hero, Buy Book and Magazines option)
/emagazines : All the magazines (descending order of created at)
/ebooks : All books
/dashboard : All books accessible by user
/dashboard/read : Reading Page.

API Routes:

/api/get-all-books : Fetching All Books
/api/get-all-mags : Fetching All Magazines
/api/book?bookId=XYZ : Fetching a Single Book
/api/mag?magId=XYZ: Fetching a Single Magazine
/api/add-to-dashboard?userId=XYZ&bookId=PQR : Adding a book/magazine to dashboard after purchasing.
/api/get-user-dashboard?userId=XYZ : Fetching user dashboard (accessible books).
/api/check-access : Checking if user has access to a book/magazine.

DB Models:

Book Schema:

{title, author, description, price fileLocation, coverImage. isbn, createdAt}

Magazine Schema:

{title, description, price, fileLocation, coverImage. issn, createdAt}

Razorpay

About

A Next.js web app to buy and read e-Books & e-Magazines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • CSS 1.3%
  • JavaScript 0.3%