Build your first backend server.
You'll clone a small, real FastAPI app, run it on your own computer, change something, and put it online. No experience needed — just follow the steps in order.
A tiny text-toolkit API
hibot-fastapi-starter is a small web server — a program that waits for requests and sends back answers. This one does simple text jobs (like counting words or cleaning up input). The magic part: FastAPI builds you an interactive page at /docs where you can try every feature in your browser without writing any extra code.
By the end of this page you'll have it running on your own machine, you'll have added your own feature, and you'll have it live on the internet. That's the whole shape of backend development — and you'll have done it once, for real.
Three things to have ready
- Python 3.10 or newerGet it from python.org. To check what you have, open a terminal and type
python --version. - A terminalThe text window where you type commands. It's called Terminal on Mac/Linux and PowerShell on Windows — both work.
- A code editor (recommended: Cursor)Any editor opens the files. We like Cursor because its built-in AI can explain each line and help when you get stuck.
Let an AI editor sit beside you
Cursor is a code editor with an AI built in. Open the project in it and you can highlight any line and ask "what does this do?", or describe a change in plain English and watch it edit the file. New builders get 50% off their first month through our link.
From clone to live, one step at a time
-
Get the code onto your computer
In your terminal, "clone" the repo — that just means download a copy you can edit. Then step into the new folder.
# copy the project to your computer git clone https://github.com/Cartooli/hibot-fastapi-starter.git cd hibot-fastapi-starterNo Git installed? On the repo page, click the green Code button → Download ZIP, then unzip it.
-
Install what it needs
The app depends on a few Python packages. This one command reads the included list and installs them all.
pip install -r requirements.txtIf
pipisn't found, trypip3orpython -m pipinstead. -
Run it on your own machine
Start the server. It will keep running and print a web address.
python main.pyNow open
http://localhost:8000/docsin your browser. That's your server, running on your computer. Try the buttons on that page — each one calls a real feature of the app. -
Look around the files
Open the folder in your editor. You don't need to understand everything — just know where things live:
main.py— the app itself: every feature (called a route) is defined here.
sanitize.py— a helper that cleans up user input so it's safe.
templates/andstatic/— the pages and styling.
tests/— automatic checks that prove the app still works. -
Make your first change
Open
main.pyand find a route — a chunk that starts with@app.get(...). Copy the pattern to add a tiny one of your own:@app.get("/hello") def hello(): return {"message": "Hi from my first server!"}Save the file, stop the server (press Ctrl + C in the terminal), run
python main.pyagain, and visithttp://localhost:8000/hello. You just added a feature to a backend. That's the loop you'll repeat forever. -
Save your work with Git
Lock in your change so it's never lost. Make your own empty repo on GitHub first, then:
git add . git commit -m "Add my first route" git remote set-url origin https://github.com/YOUR-USERNAME/YOUR-REPO.git git push -u origin mainNew to this? Our guide to pull requests walks through saving and publishing work on GitHub.
-
Put it on the internet
Connect your GitHub repo to Vercel (it runs Python apps for free). Import the repo, click deploy, and a few seconds later you'll get a public web address anyone can open. Every time you push a change, Vercel updates the live site automatically.
Want the full picture of where apps run? Read Vercel vs Railway →
Totally normal — here's the fix
- "command not found: python"Try
python3instead ofpython. If neither works, Python isn't installed yet — grab it from python.org. - "port 8000 is already in use"Another program is using that address. Close it, or run
python main.pyafter stopping any other server you started. - "ModuleNotFoundError"The packages didn't install. Re-run
pip install -r requirements.txtand watch for errors. - The page won't loadMake sure the terminal still shows the server running, and that you typed the address exactly:
http://localhost:8000/docs.
Keep building
Try another starter, or dig into the tools you just used.
You built a backend. What's next?
Open the live sample, see how it behaves, then keep going. New builders: let Cursor write the next version with you — 50% off your first month through our link.