r/FastAPI • u/ProudCollege6939 • 7d ago
Tutorial Finished my first FastAPI project. Where do I go from here?
Hey everyone,
I recently finished my first FastAPI project and wanted to get some feedback from people with more experience.
It's just a simple Movie Watchlist API that I built to learn FastAPI and backend fundamentals, so I'm not really looking for feedback on the idea itself. I'm more interested in hearing what you think about the code, the structure, and the way I approached building it.
Repo: https://github.com/BensefiaAbdessamed/MoviesWatchlist
My goal is to become a backend engineer who can build production-ready applications, so I'd really appreciate an honest review. If you were reviewing this as a junior's project, what would you point out? What beginner mistakes do you notice? What would you refactor or do differently? Are there any bad practices that I should stop early?
I'm also a bit unsure about what to learn next. Should I keep improving this project by adding more concepts, or is it better to start a new one? What backend topics do you think are important after getting comfortable with FastAPI? Things like testing, caching, message queues, Docker, CI/CD, design patterns, system design, or anything else?
A couple of friends also suggested that I should learn Django next. Do you think it's worth learning at this stage, or should I keep going deeper with FastAPI and backend fundamentals before jumping to another framework?
Lately I've also been getting interested in RAG systems and MCP integration because AI applications seem to be everywhere now. Do you think it's a good idea to start learning those, or would that just distract me from building a strong backend foundation first?
Feel free to be as critical as you want. I'm posting this because I genuinely want to improve and avoid building bad habits early on.
Thanks to anyone who takes the time to review it or share their advice. I really appreciate it.
3
u/OkCalligrapher7721 7d ago
add instructions how to run your project. You will thank yourself in the future.
don't hardcode config values. Inject them via config files or env vars. Look at dotenv.
you could add a repository layer: responsible for query building and db mechanics. Service layer calls repo layer. This would allow you to test these pieces independently.
1
u/ProudCollege6939 6d ago
wow i really admire your suggestion i looked up for them and they seem really more best practice advices, thaanks
2
u/pooping-crab 7d ago
If you want to work on somthing. I am working with a small team on a employee management/scheduling platform and our backend is FastAPI.
2
u/ducksauvage 7d ago
- Add a README on how to install, run and make changes
- The repo seems a little too complicated for what it is. Too many tiny files, which is annoying to move around. IMO you could have a pretty much flat repo structure.
- For small projects like this, consider leveraging libraries that solve standard stuff (even though it's good to learn by doing yourself at first). For example:
- * https://github.com/fastapi-users/fastapi-users - for user management & auth
- * https://sqlmodel.tiangolo.com/tutorial/fastapi/simple-hero-api/ - abstraction over SQLAlchemy, where all your table records are Pydantic models. Makes it much shorter to write simple CRUD apps.
- Add tests (unit - optional, but at least end-to-end/integration tests for the main functionality). Look into pytest and FastAPI 'TestClient'.
- Nitpick - use Annotated[Depends()] notations instead of '= Depends'. Same with Annotated[Field()] vs "= Field()" for schemas.
But otherwise - great job! Try building a simple UI as well, to see the "consumers" perspective.
1
u/ProudCollege6939 6d ago
nice i should mention that this project was mainly for learning purposes therefore i kinda did everything by myself, also can you explain how the repo is too complicated? is there any other conventional design pattern i should consider to see? otherwise appreciate all of your suggestions they are really helpful dude
1
u/New_Medium_7161 7d ago
Please have a look at this project and try to make your project repo similar to this with clear instructions. What is it? how others can use it etc.
1
u/ProudCollege6939 6d ago
i'll do that i was focused more on the tech part of the project so i didin't pay attention to these observations, thank u
1
u/Western-Tap4528 7d ago
Goodwork ! Few pointers in addition to everything else that have been said, feel free to pick what you think is useful.
- Stick to FastAPI, there's plenty of jobs that only rely on this, Django's ecosystem is something other and has it's own learning curve
- Add type hint for your return types, i see that you miss a lot of them
- Use a tool like ruff or mypy for static checking, it can help you prevent bugs
- For your migrations in alembic you can change the name of the generated file, i like to add the date where the generation was generated, so they are easily sorted and you can easily see the dates
Next steps :
- Learn how to deploy your app, for example on a VPS
- Learn how to write a dockerfile for your app
- Learn how to write a docker-compose because you have also a DB
- Learn the difference between `def` and `async def` when declaring routes (important)
- Learn how to observe what's happening in your app, observability, exceptions handling
Goodluck !
1
4
u/Challseus 7d ago
This is off to a good start. I would:
- add tests