kriasoft / react-starter-kit

The web's most popular Jamstack front-end template (boilerplate) for building web applications with React
https://reactstarter.com
MIT License
22.69k stars 4.16k forks source link

Serverless (Remove: sqlite, passport, etc.) #1430

Closed GideonFlynn closed 3 years ago

GideonFlynn commented 6 years ago

Based on branch feature/apollo

Firstly, I want to say that this project is really good and nice to work with. Thank you so much for creating it and keeping it updated.

I have been thinking that I want to have a separate project for my API endpoints. I've been looking at nodejs starter kit and would like to find out if I can use these projects together and create a 'microservices' like architecture.

I hope this suggested way of using RSK is viable and usable in production.

What I want to do is:


So far I've been able to run both projects in a Docker env and the containers can ping each other. I'm using a docker-compose file with custom defined networks, just to clarify how I'm doing that.

I have also:


I think it would be a great help to have an updated branch for people who want to use RSK but already have databases and endpoints they'd want to integrate.

An effort has already been made(#1057), I'll reference this even though I'm not sure how much they overlap.

frenzzy commented 6 years ago

After creating a new project with react-starter-kit as a front-end and nodejs-api-starter as a backend and configured basic stuff (start/build/deploy/test) we will remove data layer from this boilerplate. Coming soon...

GideonFlynn commented 6 years ago

If I can do anything to speed things up, let me know. I'm very eager to try this! :)

Do you have a more specific timeframe? I know it's hard to say exactly when, but it would be nice to know whether it's days, weeks or months.

frenzzy commented 6 years ago

We added a new app-starter-kit (ASK) repo with react-starter-kit (RSK) as a frontend and nodejs-api-starter (NSK) as a backend. Remaining to add a basic configuration (start/build/deploy/test) and tips to readme (requirements/getting starter/deployment). After that we will be able to remove data layer from RSK. Feel free to send PRs :)

patrick-samy commented 6 years ago

Would you suggest I use react-static-boilerplate for a serverless app? Or would it be better to take out the backend dependencies of react-starter-kit?

I'm planning to use Relay Modern or Apollo and a graphql-go on the backend.

frenzzy commented 6 years ago

@patrick-samy it is easier to develop serverless apps but SSR has its advantages. I think ASK will stick with RSK, you can swap frontend to RSB if you want. Backend part (data layer) will be removed from RSK in favor of GraphQL cloud api by default (the transition to Rest API should be simple). Also probably we will start using Relay Modern in master branch. ASK will contain basic configuration of RSK and NSK working together.

ulani commented 3 years ago

@GideonFlynn thank you very much for crating this issue! Unfortunately, we have close it due to inactivity. Feel free to re-open it or join our Discord channel for discussion.

NOTE: The main branch has been updated with React Starter Kit v2, using JAM-style architecture.