Giter VIP home page Giter VIP logo

fastapi-admin-panel's Introduction

FastAPI and PostgreSQL - Admin Panel

Python 3.9 Platform GitHub license

Backend stack using Python , including interactive API documentation and many useful features out of the box.

Interactive API documentation

Swagger

Alternative API documentation

Redoc

Features

  • Full Docker integration (Docker based).

  • Docker Compose integration.

  • Production ready Python web server using Uvicorn.

  • Python FastAPI backend.

  • Secure password hashing by default.

  • JWT token authentication.

  • SQLAlchemy models.

  • Alembic migrations.

  • CORS (Cross Origin Resource Sharing).

  • REST backend tests based on Pytest, integrated with Docker, so you can test the full API interaction, independent on the database. As it runs in Docker, it can build a new data store from scratch each time.

  • Secure docs behind basic http auth.

  • Sentry integration (application monitoring and error tracking).

  • SendGrid integration (email delivery service).

  • Email confirmation when registering a user.

  • Integration with Social Networks (Vkontake, Facebook, Gmail).

  • Beauty mixins for Asynchronous SQLAlchemy.

How to use it

Generate passwords

You will be asked to provide passwords and secret keys for several components. Open another terminal and run:

openssl rand -hex 32
# Outputs something like: 99d3b1f01aa639e4a76f4fc281fc834747a543720ba4c8a8648ba755aef9be7f

Environment variables

The input variables, with their default values:

  • PROJECT_NAME: The name of the project

  • VERSION: Project version

  • SERVER_DOMAIN: The domain in where to deploy the project. By default, based on the http://localhost:8000.

  • FIRST_SUPERUSER_LOGIN: The first superuser generated, with it you will be able to create more users, etc.

  • FIRST_SUPERUSER_PASSWORD: First superuser password. Use the method above to generate it.

  • DOCS_ADMIN_USERNAME: Username for basic http auth of secure docs.

  • DOCS_ADMIN_PASSWORD: Password for basic http auth of secure docs.

  • ENV: Environment mode, like DEV or PROD.

  • SENTRY_DSN: Key URL (DSN) of Sentry, for live error reporting.

  • AUTH_SECRET_KEY: Backend server secret key. Use the method above to generate it.

  • EMAIL_SEND_MODE: Send emails via post service. By default off and show message context on output.

  • SEND_GRID_KEY: Key of SendGrid, for sending emails.

Other environment variables could be found in env.template of backend directory.

How to deploy

  • Create .env file in backend directory with settings from .env.template.

  • Run command docker-compose up --build -d.

  • Check URL http://127.0.0.1:8000. By default for secure docs use credentials: admin:admin.

fastapi-admin-panel's People

Stargazers

 avatar

Watchers

Dark-Bright 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.