{"id":23250933,"url":"https://github.com/jockerz/starlettestarter","last_synced_at":"2025-08-20T09:31:03.651Z","repository":{"id":161116990,"uuid":"618051645","full_name":"jockerz/StarletteStarter","owner":"jockerz","description":"Starlette web application starter. Ready with Register, Login, Forgot Password, Setting and more pages.","archived":false,"fork":false,"pushed_at":"2024-11-13T10:50:07.000Z","size":5627,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-13T11:35:24.532Z","etag":null,"topics":["arq","asgi","sqlalchemy","starlette","tabler"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jockerz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-03-23T16:46:42.000Z","updated_at":"2024-11-13T10:50:13.000Z","dependencies_parsed_at":"2023-10-11T22:13:31.553Z","dependency_job_id":"76cb260b-5576-4920-a3eb-d6e8f716dd89","html_url":"https://github.com/jockerz/StarletteStarter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jockerz%2FStarletteStarter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jockerz%2FStarletteStarter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jockerz%2FStarletteStarter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jockerz%2FStarletteStarter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jockerz","download_url":"https://codeload.github.com/jockerz/StarletteStarter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230408183,"owners_count":18220977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["arq","asgi","sqlalchemy","starlette","tabler"],"created_at":"2024-12-19T09:15:52.222Z","updated_at":"2025-08-20T09:31:03.643Z","avatar_url":"https://github.com/jockerz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Frontend Choice : _Tabler_ | [AdminLTE](https://github.com/jockerz/StarletteStarter/tree/adminlte)\n\n\n# Introduction\n\nThis is a full web app using [Starlette][Starlette].\n\nThis project exists with the help of some of really great tools.\n\n- [Starlette][Starlette]: Lightweight ASGI framework/toolkit \n  for building async web services\n- [Tabler][Tabler]: UI kit based on Bootstrap 5\n- [SQLAlchemy][SQLAlchemy]: The Python SQL Toolkit and Object Relational Mapper\n- [Arq][arq]: Job queues and RPC in python with asyncio and redis\n- [SQLAdmin][SQLAdmin]: Admin interface for SQLAlchemy models\n- [Authlib][authlib]: The ultimate Python library in building OAuth and OpenID Connect servers\n- _And more..._\n\n## Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003eHome Page\u003c/summary\u003e\n\n![Login Page](./screenshots/home.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLogin Page\u003c/summary\u003e\n\n![Login Page](./screenshots/login.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRegister Page\u003c/summary\u003e\n\n![Login Page](./screenshots/register.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eForgot Password Page\u003c/summary\u003e\n\n![Login Page](./screenshots/forgot.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUser Profile Setting Page\u003c/summary\u003e\n\n![Login Page](./screenshots/profile.png)\n\n\u003c/details\u003e\n\n\n# Setup\n\n## Requirements\n\n- Python: at least version 3.10\n- Database: SQLite, MySQL, PostgresQL or anything that is supported by \n  [SQLAlchemy][SQLAlchemy]\n- Redis\n- SMTP\n- OAuth2 (GitHub and Google)\n\n\n## Clone the Repository\n\n```sh\ngit clone --depth=1 https://github.com/jockerz/StarletteStarter\n```\n\n## Application Configuration\n\nApplication configuration is required as on `.env.example`.\nYou can copy this file as `.env` and edit it as you want.\n\n```shell\ncp .env.example .env\n```\n\n## Process Files Directories\n\n```shell\nmkdir -p files/{logs,pids}\n```\n\n## Database\n\n### SQLite\n\nAdditional requirements\n```\naiosqlite\n```\n\n`.env`\n```\nDATABASE_URL=sqlite+aiosqlite:///./sqlite.db\n```\n\n### MySQL\n\nAdditional requirements\n```\naiomysql\nPyMySQL\n```\n\n`.env`\n```\nDATABASE_URL=mysql+aiomysql://USER:PASSWORD@127.0.0.1/DATABASE_NAME\n```\n\n### PostgresQL\n\nAdditional requirements\n```\nasyncpg\n```\n\n`.env`\n```\nDATABASE_URL=postgresql+asyncpg://USER:PASSWORD@127.0.0.1/DATABASE_NAME\n```\n\n## Install Python Modules\n\n```sh\n# Create Virtualenv\nvirtualenv -ppython3 venv\n\n# Activate virtualenv\nsource venv/bin/activate\n\n# Install modules\npip install -r requirements/apps.txt\n```\n\n### Create Tables\n\n```bash\n# Initialisation\nmkdir alembic/versions\n\n# Generate migration scripts\nalembic revision --autogenerate -m 'initial'\n# Run first migration\nalembic upgrade head\n```\n\n### Add New Model Table\n\nAfter create new DB model, make sure it has been imported on `apps.core.db_tables`, then run:\n\n```bash\n# Generate migration scripts\nalembic revision --autogenerate -m 'initial'\n# Run first migration\nalembic upgrade head\n```\n\n\n## Translations\n\n### Extract Localizable Messages\n\n```shell\nbash scripts/transation.sh extract\n```\n\n### Update Translation Files\n\n```shell\nbash scripts/transation.sh update\n```\n\n### Compile Translation Files\n\n```shell\nbash scripts/transation.sh compile\n```\n\n\n## Redis\n\nRedis is required for [`arq`][arq] for \njob queues and RPC in python with asyncio and redis.\n\n\u003e See `Redis: Arq` section on the `.env` file.\n\n\n## SMTP\n\nUpon **registration**, **password update**, **reset password** action,\nyou need to open links that sent to your email.\n\nWhite starting this web application, \nyou can use a really cool **fake SMTP** service that provided by \n[Ethereal Email][ethereal].\n\nFor production use, you may edit the SMTP configuration on the `.env` file\nfor any SMTP service you like.\n\n\u003e See `SMTP: Email` section on the `.env` file.\n\n\n## Admin User\n\nOn first startup, an `admin` user is created.\nThe credentials should be placed on `.env` file.\n\nAdmin configuration example on `.env` file\n\n```text\nADMIN_USERNAME=admin\nADMIN_PASSWORD=password\nADMIN_EMAIL='admin@localhost'\n```\n\n## OAuth2\n\nThis web app is extended to use third party Oauth2 provider such as *Google* and *GitHub*.\nWe need to set up OAuth2 configuration one `.env`.\n\n```text\nGITHUB_CLIENT_ID=\nGITHUB_CLIENT_SECRET=\nGOOGLE_CLIENT_ID=\nGOOGLE_CLIENT_SECRET=\n```\n\nPlease make sure to set the scopes for the OAuth2 clients for at least to be able to see `email` and public profile. \n\n\n# Run Locally (Development Mode)\n\n## Update `.env`\n\n```text\nENV=dev\n```\n\n\n## Web Application Service\n\n```shell\nbash scripts/dev.sh\n```\n\n## Arq (Job Queueing and Processing)\n\n```shell\nbash scripts/arq.sh\n```\n\n# Run In Production\n\nFor production use, make sure you edit the `.env` configuration file, such as.\nMake sure you use proper value for `SECRET_KEY` and admin user credentials.\n\n```text\nENV=prod\nSECRET_KEY=CHANGE THIS SECRET\n\nADMIN_USERNAME=admin\nADMIN_PASSWORD=password\nADMIN_EMAIL='admin@localhost'\n```\n\nThen make sure you use a real SMTP Provided and edit the SMTP configuration.\n\n## Web Application Service\n\n```shell\nbash scripts/prod.sh\n```\n\n## Kill the services\n\n```shell\nkill `cat files/pids/web_app.pid`\n```\n\n## Arq (Job Queueing and Processing)\n\n```shell\nbash scripts/arq.sh\n```\n\n## Nginx\n\nPlease take a look on `configs/nginx_conf_d_yousite.conf`.\nCopy that file and edit on `/etc/nginx/conf.d/yoursite_com.conf`.\n\n## SSL Certificate\n\nPlease consider to create a free SSH Certificate you your web app. :)\n\n[Letsencrypt][Letsencrypt] will help you to run your web application to this.\n\n# Test\n\n## Install Test Packages\n\n```shell\npip install -r requirements/test.txt\n```\n\n## Run Test\n\n```shell\npytest\n```\n\n# Changes\n\n## 2025-05-06\n\n - Add new branch [AdminLTE](https://github.com/jockerz/StarletteStarter/tree/adminlte)\n\n\n## 2024-11-8\n\n - Python library updated\n - [Arq-dashboard](arq-dashboard) still not working\u003cbr/\u003e\n   Remove it later\n\n\n## 2023-10-27\n\n - Update __README__ for missing starting instruction\n\n\n## 2023-10-24\n\n - Remove usage of [arq-dashboard][arq-dashboard].\u003cbr/\u003e\n   Remove `arq-dashboard` by running `pip uninstall arq-dashboard` command \n   to be able to update to current version\n\n\n[arq]: https://arq-docs.helpmanual.io\n[arq-dashboard]: https://github.com/ninoseki/arq-dashboard\n[authlib]: https://authlib.org\n[ethereal]: https://ethereal.email\n[Letsencrypt]: https://letsencrypt.org\n[SQLAdmin]: https://aminalaee.dev/sqladmin\n[SQLAlchemy]: https://docs.sqlalchemy.org/en/20/\n[Starlette]: https://www.starlette.io\n[Tabler]: https://tabler.io\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjockerz%2Fstarlettestarter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjockerz%2Fstarlettestarter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjockerz%2Fstarlettestarter/lists"}