{"id":26045093,"url":"https://github.com/hoyirul/fastapi-starter-api","last_synced_at":"2026-04-07T20:31:14.742Z","repository":{"id":281113440,"uuid":"944238549","full_name":"hoyirul/fastapi-starter-api","owner":"hoyirul","description":"A fast and lightweight FastAPI starter template to quickly set up API projects. Includes basic configurations, authentication, and routing to help you kickstart your backend development with minimal setup.","archived":false,"fork":false,"pushed_at":"2025-05-17T16:43:52.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T17:36:13.296Z","etag":null,"topics":["chiper","fastapi","jwt","modular","postgresql","python","redis","restful-api","starter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoyirul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-07T02:29:59.000Z","updated_at":"2025-05-17T16:43:56.000Z","dependencies_parsed_at":"2025-05-17T17:28:24.842Z","dependency_job_id":"a3290122-e515-4db4-8c14-ffe60e21c7b3","html_url":"https://github.com/hoyirul/fastapi-starter-api","commit_stats":null,"previous_names":["hoyirul/fastapi-starter-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hoyirul/fastapi-starter-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoyirul%2Ffastapi-starter-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoyirul%2Ffastapi-starter-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoyirul%2Ffastapi-starter-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoyirul%2Ffastapi-starter-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoyirul","download_url":"https://codeload.github.com/hoyirul/fastapi-starter-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoyirul%2Ffastapi-starter-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chiper","fastapi","jwt","modular","postgresql","python","redis","restful-api","starter"],"created_at":"2025-03-07T19:31:27.950Z","updated_at":"2026-04-07T20:31:14.720Z","avatar_url":"https://github.com/hoyirul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FASTAPI-STARTER\n\n## Structure\n```bash\naccounting-backend/\n├── docs/\n│   ├── convention-id.md\n│   ├── convention-en.md\n├── src/\n│   ├── modules/\n│   │   ├── modules1/\n│   │   │   ├── __init__.py\n│   │   │   ├── models.py\n│   │   │   ├── schemas.py\n│   │   │   ├── services.py\n│   │   │   ├── routes.py\n│   │   │   └── tests/\n│   │   │       ├── __init__.py\n│   │   │       └── test_accounts.py\n│   │   ├── logs/\n│   │   │   ├── __init__.py\n│   │   │   ├── models.py\n│   │   │   ├── schemas.py\n│   │   │   ├── services.py\n│   │   │   ├── routes.py\n│   │   │   └── tests/\n│   │   │       ├── __init__.py\n│   │   │       └── test_logs.py\n│   │   └── __init__.py\n│   ├── config/\n│   │   ├── __init__.py\n│   │   ├── config.py\n│   ├── database/\n│   │   ├── __init__.py\n│   │   ├── db.py\n│   │   ├── redis.py\n│   ├── tools/\n│   │   ├── __init__.py\n│   │   ├── response.py\n│   │   ├── dependency.py\n│   │   ├── logger.py\n│   │   └── security.py\n│   ├── main.py\n│   ├── routers.py\n│   └── startup.py\n├── sync/\n│   ├── migrations/\n│   │   ├── __init__.py\n│   ├── seeders/\n│   │   ├── __init__.py\n│   ├── setup.py\n├── templates/\n│   ├── fastapi.svg\n│   ├── index.html\n├── .env\n├── .env.example\n├── .gitignore\n├── app.py\n├── docker-compose.yml\n├── Dockerfile\n├── madhai.py\n├── README.md\n└── requirements.txt\n```\n\n## Installation\n1. Clone the Project\n    ```bash \n    \u003e git clone giturl\n    ```\n2. Setup Environment\n    ```bash \n    \u003e cd accounting-be\n    \u003e python -m venv venv\n    \u003e source venv/bin/activate # Linux/MacOS\n    \u003e venv\\Scripts\\Activate # Windows OS\n    \u003e pip install -r requirements.txt\n    ```\n3. Setup project\n    ```bash \n    \u003e cp .env.example .env\n    ```\n4. Setup database, update your env for connect to database\n    ```bash \n    # REDIS\n    REDIS_HOST=127.0.0.1 # or you ip address\n    REDIS_PORT=6379 # your redis port\n    REDIS_PASSWORD=secret # Change this value after step 5\n\n    # PostgreSQL\n    DB_SECRET_KEY=\n    DB_DRIVER=asyncpg\n    DB_CONNECTION=postgresql\n    DB_USER=postgres\n    DB_PASSWORD=your_password # Change this value after step 5\n    DB_HOST=localhost\n    DB_PORT=5432\n    DB_NAME=your_db_name\n    ```\n5. Make SECRET KEY and JWT SECRET KEY\n    ```bash\n    \u003e python madhai --generate --key 32 # byte_int -\u003e 8, 16, 32, 64 etc (default 32) for generate secret key\n    \u003e python madhai --hash your_password --key from_DB_SECRET_KEY # You can get the key from the log output then copy and paste it to the DB_PASSWORD or DB_REDIS_PASSWORD value in the .env file\n\n    # Then update your env for DB_PASSWORD value with log output \n    ```\n6. Sync Database with Migrations and Seeders\n    ```bash\n    \u003e python madhai --upgrade # for run all migrations\n    \u003e python madhai --seed # for run all seeders\n    ```\n7. Run Application\n    ```bash\n    \u003e fastapi dev app.py # for run application with host=127.0.0.1 and port=8000\n    \n    # or\n\n    \u003e fastapi dev app.py --host 0.0.0.0 --port 8000 # for run application with host=your_ip_address and port=8000\n    ```\n\n## Run Project\n1. Make a modules\n    ```bash\n    \u003e python madhai --module modulename # for make a module like categories, roles, users etc. Then go to the module on src/module/modulename\n    \u003e python madhai --module yourdir/modulename\n    ```\n    \u003cb\u003eImportant : \u003c/b\u003e the folder name you should (`snake_case`) following the code convention [convention-id](/docs/convention-id.md) or [convention-en](/docs/convention-en.md) \n2. Make migrations\n    ```bash\n    \u003e python madhai --make --migration your_migration_name # for make a migration file, (`snake_case`) for example `create_table_users` then file automatically created on `src/database/migrations` your_migration_name_migration.py (IMPORTANT: you should create a migration file with create_table_ prefix)\n    ```\n3. Run migrations\n    ```bash\n    \u003e python madhai --upgrade --table your_migration_name # for specific migration\n    \u003e python madhai --upgrade # for all migration\n\n    \u003e python madhai --downgrade --table your_migration_name # for drop specific migration\n    \u003e python madhai --downgrade # for drop all migration\n\n    \u003e python madhai --make --alter --migration your_migration_name # for make a migration file with alter table, (`snake_case`) for example `alter_table_users` then file automatically created on `src/database/migrations` your_migration_name_migration.py (IMPORTANT: you should create a migration file with alter_table_ prefix)\n    \u003e python madhai --upgrade --alter --table your_migration_name # for specific migration with alter table\n    \u003e python madhai --downgrade --alter --table your_migration_name # for drop specific migration with alter table\n\n    ```\n    \u003cb\u003eIMPORTANT:\u003c/b\u003e After you run the migration, you should modify the migration file to add the column, table, or anything you want to change\n    - Docs Create Statement (PostgreSQL) : [PostgreSQL Docs](https://www.w3schools.com/postgresql/postgresql_create_table.php)\n    - Docs Alter Statement (PostgreSQL) : [PostgreSQL Docs](https://www.w3schools.com/postgresql/postgresql_alter_column.php)\n4. Make seeders\n    ```bash\n    \u003e python madhai --make --seeder your_seeder_name # for make a seeder file, (`snake_case`) for example `users` or `categories` then file automatically created on `src/database/seeders` your_seeder_name_seeder.py\n    ```\n5. Run seeders\n    ```bash\n    \u003e python madhai --seed --table your_seeder_name # for specific seeder\n    \u003e python madhai --seed # for all seeder\n\n    \u003e python madhai --rollback --table your_seeder_name # for truncate specific seeder\n    \u003e python madhai --rollback # for truncate all seeder\n    ```\n\n## References\n- [FastAPI Documentation](https://fastapi.tiangolo.com/tutorial/first-steps/)\n- [SQLAlchemy Documentation](https://fastapi.tiangolo.com/tutorial/first-steps/)\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/) License\n\n## Author\n[CV. Ika Raya Sentausa - 2024](https://irasa.co.id)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoyirul%2Ffastapi-starter-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoyirul%2Ffastapi-starter-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoyirul%2Ffastapi-starter-api/lists"}