Skip to content

Repository files navigation

nothere

It is a minimal, registration-free web application that allows multiple users to share their real-time geolocation on an interactive map. Users create or join a room by sharing a link, grant location access, and instantly see all other participants' locations on a shared map.

Try the live demo: https://nothere.rilshok.workers.dev/

This repository demonstrates the capability of building a full-featured backend in pure Python with FastAPI and deploying it to Cloudflare's serverless infrastructure. The build and deployment process leverages Pyodide (a port of CPython to WebAssembly) enabling Python code execution directly within V8 isolates on Cloudflare's edge servers. This project serves as a proof of concept, showcasing how modern serverless platforms unlock new possibilities for Python-based backend development.

Stack:

Project Structure

.
├── frontend/            # React application
│   ├── dist/            # Production build
│   ├── src/             # Source code
│   │   ├── components/  # React components
│   │   ├── hooks/       # Custom hooks
│   │   ├── pages/       # Application pages
│   │   ├── main.tsx     # Entry point
│   │   └── App.tsx      # Root component
│   ├── vite.config.ts   # Vite configuration
│   └── tsconfig.json    # TypeScript configuration
├── src/                 # Python backend
│   ├── entry.py         # Worker entrypoint
│   ├── durable.py       # Durable Objects classes
│   ├── dependency.py    # Dependencies and configuration
│   └── routes/          # API routes
├── pyproject.toml       # Python dependencies
├── package.json         # Node.js dependencies
├── wrangler.jsonc       # Cloudflare Workers configuration
└── .dev.vars            # Environment variables (development)

Prerequisites

Installing Node.js

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs

Installing uv

Fast Python package manager (installation guide)

curl -LsSf https://astral.sh/uv/install.sh | sh

Environment Setup

Create a .dev.vars file in the project root:

JWT_TOKEN=your_jwt_secret_key_here

Run in Development Mode

npm install
uv run pywrangler dev

Deploy

uv run pywrangler deploy

Additional Resources

About

FastAPI on Cloudflare Workers with Durable Objects for multi-user geolocation sharing.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages