{"id":18654145,"url":"https://github.com/se-sustainability-oss/ecodev-app","last_synced_at":"2025-04-11T17:31:09.028Z","repository":{"id":260437544,"uuid":"751367832","full_name":"SE-Sustainability-OSS/ecodev-app","owner":"SE-Sustainability-OSS","description":"modern python web application template: FastAPI/SQLModel for the backend, Dash for the frontend, docker/docker-compose for the infra","archived":false,"fork":false,"pushed_at":"2025-01-29T14:24:14.000Z","size":359,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-25T16:21:20.528Z","etag":null,"topics":["dash","docker","docker-compose","fastapi","python","sqlmodel"],"latest_commit_sha":null,"homepage":"https://ecodev-doc.lcabox.com/cookiecutters/app/","language":"Python","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/SE-Sustainability-OSS.png","metadata":{"files":{"readme":"README-template.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-01T13:26:48.000Z","updated_at":"2025-01-29T14:24:18.000Z","dependencies_parsed_at":"2024-10-31T10:28:36.401Z","dependency_job_id":"54e01472-16b2-4e07-a370-cc1510421002","html_url":"https://github.com/SE-Sustainability-OSS/ecodev-app","commit_stats":null,"previous_names":["se-sustainability-oss/ecodev-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SE-Sustainability-OSS%2Fecodev-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SE-Sustainability-OSS%2Fecodev-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SE-Sustainability-OSS%2Fecodev-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SE-Sustainability-OSS%2Fecodev-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SE-Sustainability-OSS","download_url":"https://codeload.github.com/SE-Sustainability-OSS/ecodev-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449699,"owners_count":21105543,"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":["dash","docker","docker-compose","fastapi","python","sqlmodel"],"created_at":"2024-11-07T07:14:11.071Z","updated_at":"2025-04-11T17:31:08.129Z","avatar_url":"https://github.com/SE-Sustainability-OSS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# MY-APP-NAME\n\n_Description of my app_\n\n### Usage\n\nGo to `\u003cAPP_URL\u003e` to view the app.\n\nGot to `\u003cAPI_URL\u003e/docs` to view the API documentation (with Swagger)\n\n\n### Local development\n\n1. Clone the repo and build the docker image:\n\n    ```git\n    git clone git@github.com:FR-PAR-ECOACT/\u003cnew-repository\u003e.git\n    ```\n\n2. Create an `.env` file and save it under the application's root folder. It must contain the following (you have an `env_template` to help you):\n    ```.env\n    # App name\n    app_name= My New App # Name of the app. Will appear on the app header.\n\n    # API app\n    app_port=8000 # API app port number. Remove this entry in production\n    fastapi_url= # API app web url. Fill only in production.\n\n    # Dash app\n    dash_app_port=8050 # Dash app port number. Remove this entry in production\n    dash_url= # Dash app web url.  Fill only in production.\n\n    # Jupyter app\n    jupyter_port=5000 # Jupyter notebook port number. Remove this entry in production\n\n    # Database access\n    db_port=5432 # Database port number\n    db_host=db # Database server name\n    db_name=db # Database name\n    db_username=user # Database login username. Change to a real username.\n    db_password=password # Database login password. Change to a secured password.\n\n    # Hashing secrets\n    secret_key=abcdefghijklmnopqrstuvwxyz134567890 # App secret key (for hashing purposed)\n    algorithm=HS256 # Password hashing algorithm\n\n    # Other\n    access_token_expire_minutes=1440 # App JWT access token expiry duration\n\n    # App mailbox\n    email_sender= # Mailbox email address. Put to the real email sender\n    email_password= # Mailbox password. Put to the real email sender password\n    email_smtp= # Mailbox SMTP (like smtp.gmail.com or mail.outlook.com). Put your smtp provider here\n\n    # gunicorn/uvicorn setup\n    gunicorn_setup=false # Should be True in production. Simpler to only with uvicorn for local dev\n    debug=false # Put to true if you want to be in dash debug mode\n    ```\n\n\n3. Run `make setup` to install the pre-commits\n\n4. Build the docker image\n    ```bash\n    make dev-build\n    ```\n\n5. Open your [local PGAdmin](http://localhost:5054) and login using the admin credentials.\n\n    ⚠️ You may encounter login issues if using Firefox browser.\n\n6. Connect to the database server using the admin credentials\n\n7. Create a new database `\u003cYOUR_DB_NAME\u003e_db`, as per your .env file (`db`) in the example.\n\n8. Add a user.json file under data, if you'd like to initialise a few users. It should contain:\n    ```json\n    [\n        {\n            \"id\": null,\n            \"user\": \"user_name\",\n            \"password\": \"hashed_password\",\n            \"permission\": \"permission_level\",\n            \"client\": \"project_name\",\n            \"application\": \"application_name\"\n        }\n    ]\n    ```\n\n\n9. Run the docker container\n\n    ```bash\n    docker compose up -d\n    ```\n\n10. The app should be running under http://localhost: \u003cYOUR_ENV_DASH_APP_PORT\u003e:\n\n\n10. To check for any issues, you can check the logs with:\n\n    ```bash\n    docker logs \u003cYOUR_APP_CONTAINER_NAME\u003e --tail=100 -f\n    ```\n\n    Use `Ctrl+C` to exit the logs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse-sustainability-oss%2Fecodev-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fse-sustainability-oss%2Fecodev-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse-sustainability-oss%2Fecodev-app/lists"}