Giter VIP home page Giter VIP logo

elib-dashboard's Introduction

Backend Repository

The backend code for this project can be found in a separate repository here.

eLib Book Project

eLib is a web application built using the MERN stack and TypeScript, allowing users to manage their personal library of PDF books. Users can upload, download, delete, and edit their book entries. The application also supports account creation and login, featuring dark and light themes.

Features

  • User Authentication: Create an account, login, and manage your library.
  • Book Management: Add, download, delete, and edit your books.
  • Theming: Switch between dark and light themes.
  • Storage: Books are stored securely using Cloudinary, and user information is stored in MongoDB.
  • UI: Built using the Shadcn Library for a responsive and modern interface.

Tech Stack

  • Frontend: React, TypeScript, Shadcn Library
  • Backend: Node.js, Express
  • Database: MongoDB
  • Storage: Cloudinary
  • Authentication: JSON Web Tokens (JWT)

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

If you have any questions or want to reach out or open an issue on GitHub.

Demo

Product Demo Product Demo Product Demo


Thank you for checking out the eLib Book Project! We hope you find it useful and look forward to your contributions.

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

elib-dashboard's People

Contributors

vishal0316 avatar

Stargazers

Debabrata Ghosh avatar

Watchers

 avatar

Forkers

techisheaven

elib-dashboard's Issues

Only User Can Delete Their Own Books

Currently, the application allows users to delete any book in the library. To enhance security and user experience, we need to implement a feature where only the user who uploaded a book can delete it.

Steps to Reproduce
User A uploads a book.
User B tries to delete the book uploaded by User A.
The system should prevent User B from deleting the book and display an error message.

Expected Behavior
Only the user who uploaded the book should see the delete option.
If another user attempts to delete the book (e.g., via direct API call), the backend should reject the request with a 403 Forbidden status.

Add Edit functionality and Only User Can Edit Their Own Books

Description

Currently, the application needs to restrict book editing to only the user who uploaded the book. The edit book page is already created. We need to implement the feature where only a book's owner can edit its details, and other users should not see the Edit Book button for books they did not upload.

Tasks

- Ensure the Edit Book button is only visible to the owner.
- Hide the Edit Book button for books the user did not upload.
- Display an error message if the edit fails due to authorization issues.

Steps to Reproduce

  1. User A uploads a book.
  2. User B logs in and views the list of books.
  3. User B should not see the Edit Book button for the book uploaded by User A.
  4. User B attempts to edit the book via direct URL or API call.
  5. The system should prevent User B from editing the book and display an error message.

Screenshot 2024-05-30 125604

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.