Skip to content

Commit

Permalink
Merge pull request #61 from jfmonsa/main
Browse files Browse the repository at this point in the history
(docs) Markdown documentation files improved
  • Loading branch information
jfmonsa authored Dec 10, 2024
2 parents ce954c0 + ea21013 commit 0c63cf0
Show file tree
Hide file tree
Showing 5 changed files with 291 additions and 143 deletions.
87 changes: 74 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,81 @@
## Documentación
# AtlasBooks 📚

1. [Sobre la Arquitectura](docs/architecture.md)
2. [Sobre los Test y la estrategia usada en el proyecto](docs/testing.md)
[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/jfmonsa/AtlasBooks-front/blob/main/README.md)

## Get Started
**Welcome to AtlasBooks!** 🎉

### Install dependencies
AtlasBooks is a web-based library platform designed to let users upload, download, rate, and comment on books in a seamless and collaborative environment. Inspired by Z-Library, this project demonstrates our skills in full-stack development, emphasizing quality, usability, and performance.

Run the following commands in the root directory of this project
**[🚀 Check out the live demo here!](https://atlasbooks.netlify.app/)**

```bash
npm install
```
> [!NOTE]
> This repository contains the backend code for AtlasBooks, built with the PERN stack (PostgreSQL, Express, React, and Node.js).
### To run a developer server
## Documentation

```bash
npm run start
```
Index to backend documentation files

1. [Get Started](docs/get-started.md): Instructions on how to set up and run the project locally.
2. [On Project Architecture](docs/architecture.md): Detailed explanation of the project's architecture and design patterns.
3. [API Documentation Strategy](docs/api-documentation.md): Guidelines on how to document API endpoints using Swagger.
4. [API Version Strategy](docs/api-versioning.md): Explanation of the API versioning approach used in the project.
5. [On Testing Strategy](docs/testing.md): Overview of the testing strategy, including unit, integration, and end-to-end tests.


## 🌟 Key Features

### 📄 User Profiles

- **User Registration & Authentication**: Secure login with JWT.
- **Personalized Profiles**: Manage name, email, country, and more.
- **Download History**: View all previously downloaded books.

### 🏠 Home Page

- **Recommended Books Feed**: Curated suggestions based on user preferences.
- **Advanced Search**: Filter books by author, title, genre, and publication date.

### 📚 Book Management

- **Upload Books**: Drag-and-drop functionality for book files and cover images.
- **Book Pages**: Download, rate, comment, and share books directly from their dedicated pages.
- **Recommendations**: Personalized suggestions based on your downloads and book lists.
- **Report Books**: Flag inappropriate content to maintain a quality library

### 📋 List Management

- **Create Lists**: Organize your reading journey with custom book lists.
- **Public Lists**: Share your lists with the community or explore others' collections.

### Admin options

- **User Management**: Ban/unban users violating platform policies.
- **Reports Dashboard**: Address flagged books and user issues effectively.

## 🛠 Tech Stack

- **Frontend**: Built with React.js and Vite, emphasizing responsive and accessible design using modern CSS techniques.
- **Backend**: Developed using Node.js and Express for robust API handling.
- **Database**: PostgreSQL powers efficient data storage and management.

### Other Tools

- **Jira**: Agile project management to track progress.
- **Figma**: UI/UX design tools for creating an intuitive user interface. Explore the design [here](https://www.figma.com/design/mgwoKhiK6PWJEddFpD78te/AtlasBooks?node-id=0-1&t=AN7QX4QfWvHQWtBI-1)

## 📝 Installation & Contribution

We welcome contributions to enhance AtlasBooks! 🚀
Please review our [contributing guidelines](CONTRIBUTING.md) for detailed instructions on setting up the project and submitting pull requests.

## 👩‍💻 Team Members

Meet the passionate team behind AtlasBooks:

- [Isabella Rebellón Medina](https://github.com/Issabella09) - [Email](mailto:[email protected])
- [Juan Felipe Monsalve Vargas](https://github.com/jfmonsa) - [Email](mailto:[email protected])
- [Jose Luis Ramos Arango](https://github.com/RamSterB) - [Email](mailto:[email protected])
- [Juan Sebastian Marin Serna](https://github.com/JSebastianMarin) - [Email](mailto:[email protected])
- [Juan Pablo Idarraga](https://github.com/JuanPidarraga) - [Email](mailto:[email protected])
- [Leider Santiago Cortes](https://github.com/LeiderCortes) - [Email](mailto:[email protected])
- [Nicolás Prado León](https://github.com/NicolasPL64) - [Email](mailto:[email protected])
14 changes: 10 additions & 4 deletions docs/api-documentation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# API documentation
We are using `swagger-jsdoc` and `swagger-ui-express` packages, check `.routes` files to see examples on how to document endpoints

## How to
> [!NOTE]
> Api documentation is avaiable at `api/v1/docs` route in devloper server (production url or local developer server)
## FAQ

## Resources
## Key Points to Document Each Endpoint
1. Summary and Description: Provide a brief summary and detailed description of what the endpoint does.
2. Tags: Group related endpoints together using tags.
3. Request Parameters: Document any path parameters, query parameters, headers, and cookies.
4. Request Body: Describe the structure of the request body, including required fields and their types.
5. Responses: Document the possible responses, including status codes and the structure of the response body.
6. Security: Specify any security requirements, such as authentication tokens.
25 changes: 25 additions & 0 deletions docs/api-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,33 @@

## Why is it important?

API versioning is crucial for maintaining backward compatibility while allowing for the evolution of your API. It ensures that changes to the API do not break existing clients and provides a clear path for introducing new features and improvements.

## Implemented Approach

We have chosen the middleware-based approach for API versioning. This approach allows us to handle versioning at the router level, making it easier to manage different versions of the API without duplicating code.

### Folder Structure

```
📁 server/
└── 📁 api/
├── 📁 books/
├── 📁 v1/
├── 📁 v2/
├── 📁 borrow/
├── 📁 v1/
└── 📁 v3/
└── 📁 user/
└── 📁 v1/
```

### Benefits of Middleware-Based Versioning

- **No URL Changes**: The version is specified in the headers, so the URL remains clean and consistent.
- **Granular Control**: You can version individual routes, allowing for more granular control over API changes.
- **Future-Proof**: This approach makes it easier to manage and deprecate old versions of the API without duplicating code.

## Resources

- https://www.codemzy.com/blog/nodejs-api-versioning
Loading

0 comments on commit 0c63cf0

Please sign in to comment.