An online library application where users can browse, purchase, and access books in PDF or audio format. Admins can manage the library content through an admin dashboard.
- User authentication (register, login)
- Browse and search books
- Purchase books in PDF or audio format
- User dashboard to view purchased books
- Admin dashboard to manage books
- Payment processing
- Frontend: https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip, Tailwind CSS
- Backend: https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip, Express
- Database: MongoDB
-
Clone the repository:
git clone https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip cd online-library/backend -
Install dependencies:
npm install
-
Create a
.envfile in thebackenddirectory and add your MongoDB URI and JWT secret:MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret -
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd ../frontend -
Install dependencies:
npm install
-
Start the frontend development server:
npm run serve
- Access the frontend at
http://localhost:8080. - Use the admin dashboard to upload new books and manage content.
- Users can register, login, browse, purchase, and access books.
models/https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: User schema and modelhttps://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Book schema and modelhttps://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Payment schema and model
routes/https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: User-related routes (register, login, get user)https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Book-related routes (CRUD operations)https://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Payment-related routes (process payment, get payment history)
controllers/: Controllers for handling the logic of routesmiddlewares/: Middleware for authentication and error handlinghttps://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Entry point for the backend server
src/components/: Reusable Vue componentsviews/: Vue views for different pages (Home, Books, BookDetail, Admin, etc.)router/: Vue Router configurationstore/: Vuex store for state managementhttps://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Main App componenthttps://raw.githubusercontent.com/Susan56789/edureads254/master/telergical/edureads254.zip: Entry point for the frontend application
- POST
/api/users/register: Register a new user - POST
/api/users/login: Authenticate a user and issue a JWT - GET
/api/users/:id: Get user details - PUT
/api/users/:id: Update user details
- GET
/api/books: Get a list of all books - GET
/api/books/:id: Get details of a specific book - POST
/api/books: Upload a new book (admin only) - PUT
/api/books/:id: Update book details (admin only) - DELETE
/api/books/:id: Delete a book (admin only)
- POST
/api/payments: Process a book payment - GET
/api/payments/:userId: Get payment history for a user
This project is licensed under the MIT License.