Skip to content

Commit

Permalink
Merge pull request #48 from tigran-saatchyan/documentation/47-add-doc…
Browse files Browse the repository at this point in the history
…strings-to-project

[DOCUMENTATION] adds documentation - #47
  • Loading branch information
tigran-saatchyan authored Nov 17, 2023
2 parents bc52a52 + 2a66563 commit 3af5578
Show file tree
Hide file tree
Showing 35 changed files with 1,147 additions and 68 deletions.
6 changes: 6 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ POSTGRES_PASSWORD=
POSTGRES_HOST=
POSTGRES_PORT=

TEST_POSTGRES_DB=
TEST_POSTGRES_USER=
TEST_POSTGRES_PASSWORD=
TEST_POSTGRES_HOST=
TEST_POSTGRES_PORT=

CORS_ALLOWED_HOST=
CORS_ALLOW_ALL_ORIGINS=

Expand Down
115 changes: 84 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
<a href="https://github.com/tigran-saatchyan/UniMart_by_EvoQ/blob/master/LICENSE"><img src="https://img.shields.io/github/license/tigran-saatchyan/UniMart_by_EvoQ" alt="License"></a>
<a href="https://t.me/PythonistiC"><img src="https://img.shields.io/badge/[email protected]?logo=telegram" alt="Telegram"></a>
<a href="https://www.paypal.me/TigranSaatchyan"><img src="https://img.shields.io/badge/support-paypal-blue.svg?logo=paypal" alt="Support me on Paypal"></a>
<a href="https://github.com/tigran-saatchyan/UniMart_by_EvoQ"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit" alt="Support me on Paypal"></a>
</p>



[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/tigran-saatchyan/UniMart_by_EvoQ)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Table of Contents

* [Background / Overview](#background--overview)
Expand All @@ -25,20 +22,23 @@
* [Documentation](#documentation)
* [Browser Support](#browser-support)
* [Dependencies](#dependencies)
* [Todo](#todo)
* [Release History](#release-history)
* [Changelog](#changelog)
* [Issues](#issues)
* [Bugs](#bugs)
* [Deployment](#deployment)
* [Translations](#translations)
* [Authors](#authors)
* [Acknowledgments](#acknowledgments)
* [Support](#support)
* [License](#license)

## Background / Overview

**UniMart by EvoQ API** is a tool that allows
developers to integrate e-commerce features
like product management, inventory control,
order processing, and customer data management
into their applications or websites, making it
easier to run online stores.

## Features

Expand All @@ -61,9 +61,29 @@ Open your terminal and type in.
### Setting up



### Structure / Scaffolding
```text
========= Tigran Saatchyan ~ git version 2.34.1
=============== -------------------------------------
================= Project: UniMart_by_EvoQ (2 branches)
=== ==============
=================== Created: 5 days ago
========== Language:
========================== ======= ● Python (100.0 %)
============================ ======== Authors: 100% Tigran Saatchyan 20
============================= ========= URL: [email protected]:tigran-saatchyan/UniMart_by_EvoQ.git
============================ ========== Commits: 20
========== ============================
========= ============================= Lines of code: 1369
======== ============================ Size: 244.97 KiB (60 files)
======= ========================== License: MIT
==========
===================
============== ===
=================
===============
=========
```
<details>
Expand All @@ -72,15 +92,58 @@ Open your terminal and type in.
```text
UniMart_by_EvoQ
app
├── __init__.py
├── api
│ ├── __init__.py
│ └── v1
│ ├── __init__.py
│ ├── auth.py
│ ├── cart.py
│ ├── dependencies.py
│ ├── products.py
│ └── routers.py
├── db
│ ├── __init__.py
│ └── db.py
├── main.py
├── migrations
│ ├── env.py
│ ├── README
│ ├── script.py.mako
│ └── versions
├── models
│ ├── __init__.py
│ ├── base_model.py
│ ├── cart.py
│ ├── products.py
│ └── users.py
├── repositories
│ ├── __init__.py
│ ├── cart.py
│ ├── products.py
│ └── users.py
├── schemas
│ ├── __init__.py
│ ├── cart.py
│ ├── products.py
│ └── users.py
├── services
│ ├── __init__.py
│ ├── cart.py
│ ├── managers.py
│ ├── products.py
│ └── validators.py
├── settings
│ ├── __init__.py
│ ├── auth.py
│ └── config.py
└── utils
├── __init__.py
├── factories.py
├── repository.py
├── unitofwork.py
└── utils.py
```

Expand All @@ -90,36 +153,27 @@ app
<strong>Note:</strong> The scaffolding was generated with tree.

## Documentation
- http://localhost:8000/
- http://localhost:8000/docs
- http://localhost:8000/redoc

## Dependencies

List of dependencies used in the project

[//]: # ()
[//]: # (| **Main Libraries** | **Other Libraries** |)

[//]: # (|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|)

[//]: # (| ![Python Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.python&style=flat&logo=python&label=Python&#41; | ![Pillow Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.Pillow&style=flat&label=Pillow&#41; |)

[//]: # (| ![Django Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.Django&style=flat&logo=django&label=Django&#41; | ![psycopg Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.psycopg&style=flat&label=psycopg&#41; |)
| **Main Libraries** | **Other Libraries** |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ![Python Badge](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.python&style=flat&logo=python&label=Python) | ![Alembic](https://img.shields.io/badge/FastAPI--users-%5E2.8.2-blue?logo=FastAPI) |
| ![FastAPI](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.fastapi.version&style=flat&logo=fastapi&label=FastAPI) | ![asyncpg](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.asyncpg&logo=PostgreSQL&style=flat&label=asyncpg) |
| ![SQLAlchemy](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.sqlalchemy&style=flat&logo=sqlalchemy&label=SQLAlchemy) | ![pytest](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.group.develop.dependencies.pytest&logo=pytest&style=flat&label=pytest) |
| ![Alembic](https://img.shields.io/badge/Alembic-%5E1.12.1-blue?logo=Alembic) | ![pytest](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FUniMart_by_EvoQ%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.group.develop.dependencies.ruff&logo=ruff&style=flat&label=ruff) |
| | ![pytest](https://img.shields.io/badge/pre--commit-%5E3.5.0-blue?logo=pre-commit) |
| | ![pytest](https://img.shields.io/badge/pytest--postgresql-%5E5.0.0-blue?logo=pytest) |
| | ![pytest](https://img.shields.io/badge/pytest--asyncio-%5E0.21.1-blue?logo=pytest) |
| | ![pytest](https://img.shields.io/badge/pytest--cov-%5E4.1.0-blue?logo=pytest) |

[//]: # (| ![Redis Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.redis&style=flat&logo=redis&label=Redis&#41; | ![Celery Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.celery&style=flat&logo=Celery&label=Celery&#41; |)

[//]: # (| ![Django-Celery-Beat Badge]&#40;https://img.shields.io/badge/Django--Celery--Beat-%5E2.5.0-blue?logo=Django&#41; | ![drf-yasg Badge]&#40;https://img.shields.io/badge/drf--yasg-%5E1.21.7-blue?logo=django&#41; |)

[//]: # (| ![DRF Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.djangorestframework&style=flat&logo=django&label=DRF&#41; | ![django-filter Badge]&#40;https://img.shields.io/badge/django--filter-%5E23.3-blue?logo=django&#41; |)

[//]: # (| | ![DRFSimpleJWT Badge]&#40;https://img.shields.io/badge/DRFSimpleJWT-%5E5.3.0-blue?logo=django&#41; |)

[//]: # (| | ![requests Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.requests&style=flat&label=requests&#41; |)

[//]: # (| | ![pyTelegramBotAPI Badge]&#40;https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftigran-saatchyan%2FAtomicProgress_by_Evoq%2Fdevelop%2Fpyproject.toml&query=%24.tool.poetry.dependencies.pytelegrambotapi&style=flat&label=pyTelegramBotAPI&#41; |)


## Todo
[//]: # (## Todo)


## Release History
Expand All @@ -143,8 +197,7 @@ Please make sure to read the [Issue Reporting Checklist](https://github.com/tigr

If you have questions, feature requests or a bug you want to report, please click [here](https://github.com/tigran-saatchyan/UniMart_by_Evoq/issues) to file an issue.

## Deployment

[//]: # (## Deployment)

## Translations

Expand Down
9 changes: 8 additions & 1 deletion app/api/v1/auth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Authentication routes for the FastAPI application."""

from fastapi import FastAPI
from fastapi_users import FastAPIUsers

Expand All @@ -7,7 +9,7 @@
from app.settings.auth import auth_backend

PREFIX = "/api/v1"
AUTH_TAG = "Authication"
AUTH_TAG = "Authentication"


fastapi_users = FastAPIUsers[User, int](
Expand All @@ -17,6 +19,11 @@


def set_up_auth_routes(application: FastAPI):
"""Set up authentication routes for the FastAPI application.
Args:
application (FastAPI): The FastAPI application instance.
"""
application.include_router(
fastapi_users.get_auth_router(auth_backend),
prefix=f"{PREFIX}/jwt",
Expand Down
Loading

0 comments on commit 3af5578

Please sign in to comment.