enabledu / qna

0 stars 0 forks source link

Modify the file structure to align with the assumptions made by the appins CLI tool. #12

Closed 0xsirsaif closed 1 year ago

0xsirsaif commented 1 year ago

Proposed App structure

  1. Store all domain directories inside src folder
    1. src/ - highest level of an app, contains common models, configs, and constants, etc.
    2. src/app.py - root of the project, which inits the FastAPI app
  2. Import with an explicit module name
    
    from qna_app.backend.src.db import get_client
    from qna_app.backend.src.apis import generated_async_edgeql as queries

qna/ ├── dbschema/ │ ├── migrations/ │ │ └── 00001.edgeql │ ├── default.esdl │ └── futures.esdl ├── backend/ │ ├── src/ │ │ ├── init.py │ │ ├── db.py │ │ ├── app.py │ │ ├── config.py │ │ ├── utils.py │ │ ├── requirements.txt │ │ └── apis/ │ │ ├── queries/ │ │ ├── answers.py │ │ ├── comments.py │ │ ├── questions.py │ │ └── generated_async_edgeql.py │ └── tests/ │ └── conftest.py ├── frontend/ │ └── src ├── .gitignore └── edgedb.toml

0xsirsaif commented 1 year ago

@mabagoury, @Emanmuhammeed