full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Setup Instructions for Running the Project Locally

Open mohamedachrefhacheni opened this issue 7 months ago • 12 comments

Privileged issue

  • [x] I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

Hi team,

I'd like to propose adding a clear local setup guide to help new contributors or developers get the project running on their machines quickly.

what could be included in the README.md ?

mohamedachrefhacheni avatar Apr 14 '25 20:04 mohamedachrefhacheni

First off I just want to say thank-you! Coming from Rails, I've always wished for a sensible list of good defaults for a full-stack app in the Python world and it seems like this is it!

Let me know if a list of things that caused confusion for me would be helpful and I can clean up my notes for you.

rissem avatar Apr 15 '25 01:04 rissem

I just started with this Stack so its all new to me. The biggest pain by far was hosting Traeffik. I still have no clue why its even used or what benefit it has.

After months of developing locally i wanted to host and it was a huge pain after thinking it would be easy.

In the end i used Render. Frontend and backend on Different Services and a Database running Postgres separate also. Was just a matter of getting the Env variables correct.

Really should recommend a host that it can be deployed on very easily.

Also very frustrating is the frontend setup to have to login. Should be able to just browse a website without an account and have access to endpoints etc or at least have an example of an endpoint that doesnt use Auth included.

ChrisSQL avatar Apr 16 '25 15:04 ChrisSQL

The project has a lot of potential in my point of view.

I didn't find any instructions how to setup the database.

Maybe the steps could be revised, if you start in a new machine you probably have nothing installed, so maybe a setup.sh with installing all the tools, and then a step by step until the project is running fully?

cassmtnr avatar Jun 28 '25 15:06 cassmtnr

After months of development as a learning experience with this i realised that NextJS is far superior for the frontend. SEO and image handling is incredible.

I took the backend from here. Went to render to host FastAPI and Postgres DB then hosted a Nextjs frontend on Vercel.

If they swapped this fronted to NextJS and added a one click hosting solution on something it would be the best available.

I see a lot of comments saying they swapped the frontend so im not the only one.

ChrisSQL avatar Jun 28 '25 15:06 ChrisSQL

Not step by step but rough guide would be

Think of them as 3 different things for a start

Have Github Branch

Setup 2 x Web Services on Render and a PostgresDB

PostgresDB - I ended up setting up tables manually using the models in the backend fields

Backend Frontend

Youll need to flip in and out of each setup to get your Frontend and Backend URLS etc as you setup

When setting up Render Web Services on setup in the config in the directory use /frontend and /backend as base directory

Then you just need to get all your ENV variables correct

Best you could probably do is start and when you run into issues ask here and ill answer them as theres probably a few steps im forgetting. Ill reply ASAP

ChrisSQL avatar Jun 28 '25 16:06 ChrisSQL

Just branch it, create a web service and postgres on render and set it up.

Youll need to have your ENV Variables of each. i.e db passwords etc.

Theres Logs in the WebService and Postgres that will tell you whats going wrong

On Sat, Jun 28, 2025 at 4:47 PM Cassiano @.***> wrote:

cassmtnr left a comment (fastapi/full-stack-fastapi-template#1544) https://github.com/fastapi/full-stack-fastapi-template/issues/1544#issuecomment-3015560154

@ChrisSQL https://github.com/ChrisSQL do you have a step-by-step for only the backend? And how did you connect to the frontend?

— Reply to this email directly, view it on GitHub https://github.com/fastapi/full-stack-fastapi-template/issues/1544#issuecomment-3015560154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT4QVLFR2PLAUA42AEGI533F22HLAVCNFSM6AAAAAB3D5SFESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJVGU3DAMJVGQ . You are receiving this because you were mentioned.Message ID: @.***>

ChrisSQL avatar Jun 28 '25 16:06 ChrisSQL

Learn material part, guys. The template developer is great.

Zigr avatar Jun 28 '25 16:06 Zigr

Learn material part, guys. The template developer is great.

I did wish it worked out straight out the box for hosting for me. Thought me a lot but when I eventually got the site online I realised that NextJS was easy to swap out and just performed a lot better. Night and day really with SEO and site speed. If it wasn't for this boilerplate I wouldn't have even got a start.

ChrisSQL avatar Jun 28 '25 16:06 ChrisSQL

Thanks for the answers :) I will check it out and let you know

cassmtnr avatar Jun 28 '25 17:06 cassmtnr

Do. It’s quite straightforward once you learn a few small lessons and those lessons are used across all these boilerplates so well worth learning.

On Sat 28 Jun 2025 at 18:21, Cassiano @.***> wrote:

cassmtnr left a comment (fastapi/full-stack-fastapi-template#1544) https://github.com/fastapi/full-stack-fastapi-template/issues/1544#issuecomment-3015833666

Thanks for the answers :) I will check it out and let you know

— Reply to this email directly, view it on GitHub https://github.com/fastapi/full-stack-fastapi-template/issues/1544#issuecomment-3015833666, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT4QVJCEX4GL7GRNSJPU333F3FKRAVCNFSM6AAAAAB3D5SFESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMJVHAZTGNRWGY . You are receiving this because you were mentioned.Message ID: @.***>

ChrisSQL avatar Jun 28 '25 17:06 ChrisSQL

Same here from me, and I"m pretty familiar with everything used in this stack except for Traeffik. I was hoping to just clone this repo and run 'docker compose up' from the root directory. That worked...sort of...but I can't log in using [email protected] / changethis combination. I'm not sure this is write but that's what I found digging through the docker compose file. It would be nice to have this explicitly documented in the README or deployment guide.

It would also be nice to see a tutorial that builds up to the template. Just my two cents...

golharam avatar Jul 23 '25 17:07 golharam