{"id":16398909,"url":"https://github.com/albertyw/base-flask","last_synced_at":"2025-06-14T02:38:54.256Z","repository":{"id":41459582,"uuid":"55330811","full_name":"albertyw/base-flask","owner":"albertyw","description":"Base Flask/uWSGI/nginx setup","archived":false,"fork":false,"pushed_at":"2025-03-14T07:06:10.000Z","size":3070,"stargazers_count":9,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-14T08:23:58.807Z","etag":null,"topics":["flask","hacktoberfest","nginx","python","python-3","template","uwsgi"],"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/albertyw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-04-03T05:12:15.000Z","updated_at":"2025-03-14T07:06:14.000Z","dependencies_parsed_at":"2023-09-24T07:25:12.779Z","dependency_job_id":"4101e1e3-fabf-4767-be85-226d13951050","html_url":"https://github.com/albertyw/base-flask","commit_stats":null,"previous_names":[],"tags_count":114,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertyw%2Fbase-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertyw%2Fbase-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertyw%2Fbase-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertyw%2Fbase-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albertyw","download_url":"https://codeload.github.com/albertyw/base-flask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244725627,"owners_count":20499639,"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":["flask","hacktoberfest","nginx","python","python-3","template","uwsgi"],"created_at":"2024-10-11T05:14:17.098Z","updated_at":"2025-03-21T02:32:40.688Z","avatar_url":"https://github.com/albertyw.png","language":"JavaScript","readme":"# Base Flask Setup\n\n[![Build Status](https://drone.albertyw.com/api/badges/albertyw/base-flask/status.svg)](https://drone.albertyw.com/albertyw/base-flask)\n[![Code Climate](https://codeclimate.com/github/albertyw/base-flask/badges/gpa.svg)](https://codeclimate.com/github/albertyw/base-flask)\n[![Test Coverage](https://codeclimate.com/github/albertyw/base-flask/badges/coverage.svg)](https://codeclimate.com/github/albertyw/base-flask/coverage)\n[![Varsnap Status](https://www.varsnap.com/project/bcc034eb-19df-42dc-aa30-8765868f10ec/varsnap_badge.svg)](https://www.varsnap.com/project/bcc034eb-19df-42dc-aa30-8765868f10ec/)\n\nThis is a base Flask/Gunicorn/nginx setup, useful as a skeleton for building\nsimple web apps from.  This is meant to be used for websites, as opposed to\npure JSON sites which would be better developed using a different language or\nframework (e.g. [sanic](https://github.com/channelcat/sanic)).\n\nFeatures\n--------\n\n - Developed specifically for Python 3\n - Minimal but up-to-date python dependencies\n - 100% test coverage\n - No issues from Code Climate\n - PEP8 compliant\n - Documented setup and usage procedures\n - Includes setting up secure and fast nginx/gunicorn in production\n - Docker support\n\nUsers\n-----\n\nThese repositories are based on base-flask:\n\n - [albertyw/albertyw.com](https://github.com/albertyw/albertyw.com)\n - [albertyw/pharmadataassociates](https://github.com/albertyw/pharmadataassociates)\n - [albertyw/chase-center-calendar](https://github.com/albertyw/chase-center-calendar)\n\nSetup\n-----\n\nModify and run `baseflask/scaffold.sh` to create a copy of base-flask for your\nproject needs, then run `bin/setup.sh` to set up the host.\n\nBase-flask is designed to work with a minimally sized [AWS EC2](https://aws.amazon.com/ec2/instance-types/)\nor [DigitalOcean](https://www.digitalocean.com/pricing/droplets)\ninstance, running a modern version of Ubuntu or Debian.\n\n### CDN\n\nA CDN like [cloudflare](https://www.cloudflare.com/) can also be added on to boost\nspeed.  A good cloudflare setup would be to use full SSL encryption and to\ninstall an origin certificate so that requests are encrypted end-to-end.\n\nDevelopment\n-----------\n\n### Setup\nUsing [python venv](https://docs.python.org/3/library/venv.html) and\n[direnv](https://github.com/direnv/direnv)\n\n```bash\npython3.13 -m venv env\nprintf \"source env/bin/activate\\nunset PS1\\n\" \u003e .envrc\ndirenv allow\npip install -e .[test]\nln -s .env.development .env\nnpm install\n\n# Install shellcheck\n# brew install shellcheck\n# sudo apt-get install shellcheck\n```\n\n### Spinning up the server:\n\n```bash\nnpm run build:dev\npython app/serve.py\n```\n\n### Running tests:\n\n```bash\nruff check .\nmypy .\nshellcheck --exclude=SC1091 bin/*.sh\ncoverage run -m unittest discover\nnpm test\n```\n\n### CI/CD\n\nThis repo uses:\n\n```bash\n# Switch to python 3\npyenv local 3.13\npip install -e .[test]\nln -s .env.development .env\n\n# Test\nruff check .\nmypy .\nshellcheck --exclude=SC1091 bin/*.sh\ncoverage run -m unittest discover\ncoverage report\ncodeclimate-test-reporter\nnpm test\n\n# Deployment\nssh example.com website/bin/deploy.sh\n```\n\n### Building and starting the docker container\n\n```bash\ndocker build -t $PROJECT_NAME:test .\ndocker run -t -i -p 127.0.0.1:$INTERNAL_PORT:5000 $PROJECT_NAME:test\n```\n\nProduction\n----------\n\n### Setup\n\nRun this once on a new server to set up the web app:\n\n```bash\nbin/setup.sh\n```\n\n### Deployment\n\nRun this every time for a new commit to the repository:\n\n```bash\nbin/deploy.sh\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertyw%2Fbase-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertyw%2Fbase-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertyw%2Fbase-flask/lists"}