This project is an example of how SvelteKit, FastAPI, and MongoDB can be dockerized and ran via docker compose. Note that, as of right now, this is not perfect. This project is meant to serve as an example/reference. However, it can be manually converted into a starting template.
git clone https://github.com/smartgoo/sveltekit-fastapi-mongodb.gitcd sveltekit-fastapi-mongodbnpm install frontend/docker-compose builddocker-compose uphttp://localhost:5173/http://localhost:8000/docsThis project was updated on October 23 2022, and uses the latest versions available at the time.
Please note this process is incomplete, but the process of converting a starter template would look roughly like this:
backend/app/api/endpoints and update backend/app/api/api.py accordingly. frontend/src/routes.frontend/src/lib.I hope to add more features to this project, and convert it to a full starter template at some point. Features on the roadmap are:
frontend) codebase a little bit moreA few existing existing project templates were referenced while building this. A big thanks to these: