Quickly build web application stack (for prototyping - but not only - or for learning concepts) based on FastAPI and SQLite for the backend and Svelte and Tailwindcss for the frontend.
My needs: experiments and learn ! From this template, I spent many hours analyzing tons of code and reading thousands of pages of documentation to better understand the concepts! So, I decided to simplify as much as possible and only keep what I needed. Here is the partial result! I hope my work will help you!
Note on partial result: As backend is “complete” (remove code is easy!), frontend is'nt! Due to the complete rewrite from Vue/Vuetify to Svelte/Tailwind.
Important note: For now, the backend code is completely copied from the original model. It's a form of plagiarism, but as I learn, I would try to be creative!
In his near future state, this model will offer some basic, but still important features:
As "super" admin:
As "normal" user:
.
├── CHANGELOG.md
├── CONTRIBUTING.md
├── README.md
├── cookiecutter.json # Prompts and default values
├── hooks # Pre/post-generate hook scripts
└── {{cookiecutter.project_blueprint}} # Project template
├── README.md # Project-level README
├── backend
└── frontend
Before starting, you should have python3, poetry and nvm globally installed.
Open your favorite terminal, go to your base project directory then run:
pip install cookiecutter # Once!
cookiecutter https://github.com/ffvpor/femto-full-stack.git
project_name
: The name of the project.project_blueprint
: Used for project directory. By default, based on project_nameproject_short_description
: Few words about your project.domain_main
: For future project deployment in production.backend_cors_origins
: Enabled domains (Origin) for CORS (Cross Origin Resource Sharing) to allow communication between backend and frontend.secret_key
: Used by backend to "protect" sensible data.first_superuser
: Act as administrator to manage users and app.first_superuser_password
: Administrator password, as strong as possible.sqlalchemy_database_uri
: The connection string to SQLite. By default, "sqlite:///./app/app.db".Use command below in another terminal to generate password and secret keys as asked:
$ openssl rand -hex 32
# Outputs something like:
# c3cbd330748fa67f39989b601ba04411164153646c9b5445c65cf5404580b2dc
Please read our contributing guide