FAST FullStack React with TypeScript starter kit.
FAST FullStack React with TypeScript starter kit.
If you're using Github, you can click on the "Use this template" button to create a new repository based on this starter kit.
The repo comes with some examples on how to do basic stuff. As this is not really needed in real projects, you can remove them by running:
pnpm clean-up-example-codeclone this repository into your own project folder. and start working
git clone https://github.com/gilamran/fullstack-typescript.git
cd
pnpm install
pnpm devIf you want to detach from this repository into your own repository do this:
git remote remove origin
git remote add origin YOUR_REPO_URL
git push -u origin mastertsconfig.json for client and server.NodeJs 24.14.+, Chrome 79+ or FireFox 72+…pnpm dev - Client and server are in watch mode with source maps, opens http://localhost:3000pnpm lint - Runs es-lintpnpm build - dist folder will include all the needed files, both client (Bundle) and server.pnpm start - Just runs node index.jspnpm start:prod - sets NODE_ENV to production and then runs node index.js. (Bypassing vite)In dev, port 3000 (the express server) is the single origin for everything: the HTML page, the API, and the client modules. The vite dev server runs on 5173 but stays loopback only — express proxies it under the /vite-dev prefix (including the HMR websocket), so the browser never talks to 5173 directly.
That means the app is reachable from other devices on your network at http://:3000 (as long as your OS firewall allows inbound connections on port 3000).
The prefix is defined in two places that must stay in sync: VITE_DEV_BASE in src/server/config.ts and base in src/client/vite.config.ts.
None of this applies to production, where the client is a static bundle served by express.
All applications require a config mechanism, for example, SLACK_API_TOKEN. Things that you don't want in your git history, you want a different environment to have different value (dev/staging/production). This repo uses the file config.ts to access all your app variables. And a .env file to override variable in dev environment. This file is ignored from git.
This code is released as is, under MIT license. Feel free to use it for free for both commercial and private projects. No warranty provided.
No open issues yet, or sync has not completed.