Skip to content

Backend for the Celeris project. Built with FastAPI (Python). Contacts with the Java SMS Server.

Notifications You must be signed in to change notification settings

celeris-schnell/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick Start

  1. Create a virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  2. Install Dependencies

    pip install -r requirements.txt
  3. Run with Uvicorn

    uvicorn main:app --host 0.0.0.0 --port 8000
  4. Expose with Ngrok

    ngrok http 8000
  5. Test the SMS Webhook

    You can test the webhook by sending a POST request to the /sms-webhook/ endpoint with a form field named Body.

    curl -X POST http://localhost:8000/sms-webhook/ -d "Body=Hello"

Description

This is the backend for a self-hosted SMS server (kind of like our own Twilio) which will connect and make all database actions on Supabase later on.

The .env file

user= password= host= port= dbname= ip=

Example Code

from fastapi import FastAPI, Form

app = FastAPI()

@app.post("/sms-webhook/")
async def receive_sms(Body: str = Form(...)):
    print(f"Received SMS: {Body}")
    return {"status": "SMS received"}

About

Backend for the Celeris project. Built with FastAPI (Python). Contacts with the Java SMS Server.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages