You have 3 options for getting the code:
- (recommended) Click the green "Use this template" button
- Clone the repo
- Download the zip file
Let's get the database all setup! Follow these instructions to setup your MongoDB cluster. We're going to keep your credential string safe in a .env file.
I wrote a short Python script to automate the setup. Run python setup.py and input the relevant fields to automagically set your project up, including your connection string from Mongo.
- Run
npm installfrom the project root to install the dependencies for the Express server. - Run
cd client && npm installto install the dependencies for the React frontend. - Create a
.envfile in the root of the project. - Add the following line to the
.envfile, replacingYOUR_CONNECTIONwith your connection string:MONGO_SRV=YOUR_CONNECTION
Now that we have the database configured and all of the dependencies installed, let's test out the app in development mode.
- From the root of the project, run
npm run devto start both the Express server and the React frontend. When you make changes to any files, your app will automatically update for you, so no need to rerun this command. - Open http://localhost:3000 to view the skeleton in the browser. You should see the rendered skeleton awaiting.
- Go to http://localhost:3000/api-test to test if your API is working properly. Alternatively, you can open http://localhost:8000/api/ to view the raw API response. You should see a JSON object with a message:
{message: "Hello world"}
There's not too much you need to do besides adding all your custom code. Here's a list of things you should change:
- Change the name of the app in
package.json - Change the page title in
client/public/index.html - Change the favicon in
client/public/favicon.ico - Add your own logos in
client/public/logo192.pngandclient/public/logo512.png - Build out your API by adding routers to
server/and importing them inapi/index.ts - Build out your frontend by adding pages to
client/src/pagesand components toclient/src/componentsand importing them inclient/src/App.tsx
Let's deploy to vercel!
- Push your updated code to your repo.
- Create an account on Vercel.
- Create a new project and click the "Continue with GitHub" button to link to your repo.
- Use the following settings for your project:
- Add the following environment variables:
- Click "Deploy" and wait for your app to deploy!
You can check out the deployed site for this skeleton here.

