Automation platform inspired by IFTTT/Zapier.
This repository currently contains only the backend server (FastAPI + PostgreSQL).
Web client, mobile client and docker‑compose root setup are not implemented yet.
- Backend: FastAPI (Python 3.9)
- DB: PostgreSQL via SQLModel
- Auth: JWT (email + password)
- Email helper: SMTP (env‑based config)
- Container: Docker image for the backend only
- Health check
GET /health→{"status": "ok"}
- about.json (subject requirement)
GET /about.jsonreturns:client.host: caller IPserver.current_time: Unix timestampserver.services: exampletimerservice with actions/reactions
- User management (minimal)
- Model:
User(id, email, name, hashed_password, image?) - Endpoints under
/user:POST /user/register- Body:
{ "email", "name", "new_password" } - Creates user, returns
{"status": "login success"}and sets JWT cookie
- Body:
POST /user/login- Form:
username(email),password - Returns
{ "access_token", "token_type": "Bearer" }and sets JWT cookie
- Form:
GET /user/→ list users (for now, no auth guard)GET /user/{user_id}→ get one userPATCH /user/{user_id}→ update user (name/email)DELETE /user/{user_id}→ delete user
- Model:
Note: There is no service/AREA/hook logic yet.
Only a stubtimerservice is exposed through/about.json.
- Python 3.9
- PostgreSQL running locally or reachable (create an empty DB, e.g.
area) - Optionally Docker (to run the backend in a container)
Backend needs at least:
POSTGRESQL_URI=postgresql+psycopg://<user>:<password>@<host>:<port>/<dbname>
SMTP_SERVER=smtp.example.com # can be dummy for now
SMTP_PORT=465 # must be set (int)
[email protected] # can be dummy for now
EMAIL_PASSWORD=supersecret # can be dummy for nowExample for local dev:
export POSTGRESQL_URI="postgresql+psycopg://area:area@localhost:5432/area"
export SMTP_SERVER="smtp.example.com"
export SMTP_PORT="465"
export EMAIL_USERNAME="[email protected]"
export EMAIL_PASSWORD="supersecret"From project root:
cd Backend
python3.9 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtStill in Backend/:
export POSTGRESQL_URI="postgresql+psycopg://area:area@localhost:5432/area"
# export SMTP_* and EMAIL_* as shown above
fastapi run app/main.py --port 8080Server will be reachable at:
http://localhost:8080/healthhttp://localhost:8080/about.jsonhttp://localhost:8080/docs
From Backend/:
./build_fastapi_docker_image.shThen run:
docker run --rm \
-e POSTGRESQL_URI="postgresql+psycopg://area:[email protected]:5432/area" \
-e SMTP_SERVER="smtp.example.com" \
-e SMTP_PORT="465" \
-e EMAIL_USERNAME="[email protected]" \
-e EMAIL_PASSWORD="supersecret" \
-p 8080:80 \
area-fastapiCheck:
http://localhost:8080/healthhttp://localhost:8080/about.json
- No AREA / hook engine.
- No external services (Gmail, GitHub, etc.).
- No web client, no mobile client, no root
docker-compose.yml.
This README reflects only what exists now and how to run it.