Giter VIP home page Giter VIP logo

daud-book-store-weeshr's Introduction

Project: Bookstore API

Overview:

Build a RESTful API for a bookstore application using Node.js, Express, and TypeScript. The API should manage books, authors, and categories. Each book has a title, author, category, publication year, and ISBN.

Requirements:

Setup:

  • Initialize a new Node.js project using npm or yarn.
  • Use TypeScript for your project.

Express Setup:

Set up an Express application with appropriate middleware. Include middleware for JSON parsing and logging.

Routes:

Create routes for the following CRUD operations:

Books:
  • Create a new book.
  • Get a list of all books.
  • Get details of a specific book.
  • Update the details of a book.
  • Delete a book.
Authors:
  • Create a new author.
  • Get a list of all authors.
  • Get details of a specific author.
  • Update the details of an author.
  • Delete an author.
Categories:
  • Create a new category.
  • Get a list of all categories.
  • Get details of a specific category.
  • Update the details of a category.
  • Delete a category.

Data Storage:

  • Use an in-memory array or a simple database (e.g., MongoDB or MySQL) to store books, authors, and categories.
  • Implement appropriate relationships between books, authors, and categories.

Validation:

  • Validate the input data for creating and updating books, authors, and categories.
  • Include appropriate error handling and return meaningful error messages.

Testing:

Write unit tests for at least two routes using a testing framework of your choice (Jest, Mocha, etc.).

Documentation:

  • Provide clear documentation on how to run your application and tests.
  • Include a brief overview of the project structure and any important design decisions.
  • Use Postman to document your endpoints

Bonus Points:

  • Implement sorting and filtering options for the list of books, authors, and categories.
  • Add pagination for the list endpoints.
  • Include user authentication middleware.

Submission Guidelines:

  • Fork this repository and commit your code.
  • Include a README.md file with instructions on how to run the application and tests.
  • Create a pull request with your completed assessment.

daud-book-store-weeshr's People

Contributors

codedeeai avatar

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.