Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React/FastAPI Boilerplate in Docs? #1405

Closed
Buuntu opened this issue May 13, 2020 · 8 comments
Closed

React/FastAPI Boilerplate in Docs? #1405

Buuntu opened this issue May 13, 2020 · 8 comments
Labels

Comments

@Buuntu
Copy link

Buuntu commented May 13, 2020

Is your feature request related to a problem? No

I just wanted to suggest including a React/FastAPI boilerplate project I've made loosely based off of your fullstack boilerplate in the FastAPI project generation docs? I figured since so many people use React these days it could be useful to get people started with FastAPI. Here is my repo: https://github.com/Buuntu/fastapi-react.

If the docs is not the right place for it maybe in the README in the fullstack-project you have? What are your thoughts @tiangolo? It is probably not as extensive or well tested as your project but I figure it could still be useful to people. I can make a pull request if you think this is a good idea.

The solution you would like

Describe alternatives you've considered

Additional context

@Buuntu Buuntu added the feature New feature or request label May 13, 2020
@andre-dasilva
Copy link

I was looking for something like this. i am trying to learn react (after angular) and it would be nice to have some boilerplate code

@F1r3Hydr4nt
Copy link

F1r3Hydr4nt commented May 19, 2020

I also was hoping to use fastapi with react. This is a good start but the boilerplate code should really match that of the full Vue frontend. I have looked into this and some of the Vue code can be reused, specifically utils.ts, env.ts, api.ts, interfaces/index.ts.

A new router & store accessor are mostly all that is missing, except for the finished style of course. I guess Redux & React-Router (which are combined and synced with connected-react-router) would work, I found this boilerplate: https://github.com/EdMSL/react-typescript-boilerplate but there could be better more minimal boilerplates out there (https://github.com/JaysonChiang/react-redux-router-ts-sample for example, or https://github.com/innFactory/create-react-app-material-typescript-redux, OR https://github.com/rokoroku/react-redux-typescript-boilerplate...

Would you be interested in implementing this with me @Buuntu ? Maybe we should start simply with the connected-react-router typescript example (https://github.com/supasate/connected-react-router/tree/master/examples/typescript)... I also like this package: https://react-hook-form.com/

@Buuntu
Copy link
Author

Buuntu commented May 20, 2020

I also was hoping to use fastapi with react. This is a good start but the boilerplate code should really match that of the full Vue frontend. I have looked into this and lots of the Vue code can be reused, specifically utils.ts, env.ts, api.ts, interfaces/index.ts.

A new router & store accessor are mostly all that is missing, except for the finished style of course. I guess Redux & React-Router (which are combined and synced with connected-react-router) would work, I found this boilerplate: https://github.com/EdMSL/react-typescript-boilerplate but there could be better more minimal boilerplates out there (https://github.com/JaysonChiang/react-redux-router-ts-sample for example, or https://github.com/innFactory/create-react-app-material-typescript-redux, OR https://github.com/rokoroku/react-redux-typescript-boilerplate...

Would you be interested in implementing this with me @Buuntu ? Maybe we should start simply with the connected-react-router typescript example (https://github.com/supasate/connected-react-router/tree/master/examples/typescript)... I also like this package: https://react-hook-form.com/

To create a whole dashboard for user creation? I don't know if that's necessary for a boilerplate, that feels very opinionated to me. I know that's how @tiangolo's project is setup but I imagine a lot of people are just going to want to start from scratch on the frontend (I know I usually do). I think adding pgAdmin or something similar to the docker-compose and/or basic auth/user models makes sense though.

When I start a new project, I'm more interested in just getting a modern, barebones stack in place with docker-compose to easily start a project without spending hours trying to get hot reloading to work, postgresql, reverse proxy, etc. I suppose you could make more of a full-fledged app with a dashboard to start out with but then it becomes less flexible for other uses.

@F1r3Hydr4nt
Copy link

F1r3Hydr4nt commented May 20, 2020

Yes it is just my opinion alright. The full-stack-fastapi-postgresql repo is well setup with Traefik etc.
The dashboard will likely be ripped right out of course, but I guess I thought your project just lacked standard webapp stuff like token auth & hitting api endpoints (login, create user) and examples of that sort of flexibility. ¯\(ツ)

@Buuntu
Copy link
Author

Buuntu commented May 20, 2020

Yes it is just my opinion alright. The full-stack-fastapi-postgresql repo is well setup with Traefik etc.
The dashboard will likely be ripped right out of course, but I guess I thought your project just lacked standard webapp stuff like token auth & hitting api endpoints (login, create user) and examples of that sort of flexibility. ¯_(ツ)_/¯

I do think mine is missing some examples and is definitely not as complete as the Vue full stack boilerplate. Adding an auth example would be good even if it's super basic. If you want to contribute to my project I'd be glad to work with you on that.

@F1r3Hydr4nt
Copy link

I think I am going to try clone the Vue app to React in whole as a learning exercise, I like all the bells and whistles of the fullstack fastapi cookiecutter (SMTP emailing etc). I think @tiangolo has this in mind: tiangolo/full-stack-fastapi-template#64 (comment)

@Buuntu
Copy link
Author

Buuntu commented May 20, 2020

I think I am going to try clone the Vue app to React in whole as a learning exercise, I like all the bells and whistles of the fullstack fastapi cookiecutter (SMTP emailing etc). I think @tiangolo has this in mind: tiangolo/full-stack-fastapi-postgresql#64 (comment)

Sounds like this has already been discussed then. I might add react-admin, auth, and celery in the meantime for my own projects but good to know there is something in the works.

I imagine whatever is made will be a slightly different stack so I will continue to build out my own and see if people find it useful.

@Buuntu
Copy link
Author

Buuntu commented May 22, 2020

I recently added react-admin and JWT authentication, check it out: https://github.com/Buuntu/fastapi-react

@tiangolo tiangolo added question Question or problem reviewed labels Feb 24, 2023
@tiangolo tiangolo changed the title [FEATURE] React/FastAPI Boilerplate in Docs? React/FastAPI Boilerplate in Docs? Feb 24, 2023
Repository owner locked and limited conversation to collaborators Feb 28, 2023
@tiangolo tiangolo converted this issue into discussion #9064 Feb 28, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

4 participants