/bookstore-API

In this Repository, is created for backend Bookstore API

Primary LanguagePHP

Project Description

This project is built with the Laravel framework, which provides an expressive and elegant syntax, easing common tasks like routing, authentication, and database migrations. The project includes various features like user authentication, dynamic content display, and other powerful tools that streamline web application development.

About the Project

login Credentials

live link: https://book-store-frontend-8ss5.onrender.com

Link to frontend Repo: https://github.com/katfogy/book-store-frontend

1. API Endpoints

Books:

  • Create a new book.
  • Retrieve a list of books.
  • Retrieve details of a specific book.
  • Update a book.
  • Delete a book.

Authors:

  • Create a new author.
  • Retrieve a list of authors.
  • Retrieve details of a specific author.
  • Update an author.
  • Delete an author.

2. Authentication

  • Implement HTTPOnly cookies for authentication.
  • Secure API endpoints so that only authenticated users can perform CRUD operations.

3. Validation and Error Handling

  • Validate incoming requests for creating and updating books and authors.
  • Provide appropriate error messages for invalid requests.

4. Database

  • Design a MySQL database schema to store books and authors.
  • Use Laravel’s Eloquent ORM to interact with the database.

Setup Instructions

To set up this project locally, follow the steps below:

  1. Clone the Repository:

    git clone https://github.com/katfogy/bookstore-API.git
    cd project-directory
  2. Install Dependencies: Ensure that you have Composer installed. Then run:

    composer install
  3. Copy the .env file:

    cp .env.example .env
  4. Generate Application Key:

    php artisan key:generate
  5. Set up Database:

    • Update your .env file with your database credentials.
    • Run the migrations to set up the database:
      php artisan migrate
  6. Serve the Application: Run the Laravel development server:

    php artisan serve

Now, the project should be up and running at http://localhost:8000.

Documentation

  • Code is well-documented, and you can find comments in the codebase explaining key logic.
  • Detailed API documentation can be found in the docs directory.

Demo

Once deployed, you can access the live demo here: Live Demo.

Learning Laravel

Laravel has extensive documentation to get you started, including Laravel Bootcamp and Laracasts for video tutorials.

Contributing

Thank you for considering contributing! Check out the contribution guide for more information.

License

This project is licensed under the MIT license.