A "standard" yet modern full-stack TypeScript web-application template using React/Vite on the frontend and Express on the backend, bundled with Turborepo.
Run the following command:
pnpm install
pnpm build
pnpm dev
The server will be available at http://localhost:8080
.
The client will be available at http://localhost:5173
.
- TypeScript for static type checking
- Turborepo for monorepo management
On the frontend:
- Vite for frontend development
- React for frontend UI
- React Router for frontend routing
- Mantine for frontend UI components
- Lucide for frontend icons
On the backend:
- Express for backend development
To edit the frontend, cd
into frontend
and make changes as you would normally in a standard React app.
To edit the backend, cd
into backend
and make changes as you would normally in a standard Express server.
To edit types that are shared between the frontend and backend, cd
into lib/types
, and put your types in index.ts
. You can put miscellaneous types here that you want to share between the frontend and backend in the src
directory within. Don't forget to export them!
We recommend using Fly.io for deployment.
As a fair warning, this will require a credit card. However, you shouldn't get charged for it, as Fly.io has a generous free tier.
-
Make an account on Fly.io
-
Install flyctl
-
Run
flyctl auth login
You may be prompted to add a credit card at this stage. We recommend doing so in order to proceed.
-
Run
flyctl launch
If asked to tweak settings, answer 'N' unless you know what you're doing.
After launching, the terminal should print the URL at which your app is publicly available.
-
Modify the
BACKEND_BASE_PATH
variable.If you haven't already, go to
/frontend/src/constants/Navigation.tsx
and read theTODO
instructions left there. Then, make the changes accordingly. -
Run
flyctl deploy
to re-deploy changes to your app to the same URL.
If your deployment launch name gets too long. Try going into your (fly.io)[https://fly.io] dashboard and go to Apps
then delete any current apps you may currently have. Then go back to the console and run flyctl launch
when asked "Do you want to tweak these settings before proceeding?" type "y" and then change the name to your desired name.