LIVE DEPLOYMENT
https://railway.com/project/50197769-0617-4beb-b7b2-4e11048a7114?environmentId=1725d808-7434-4aab-97a1-ece085b07e5b
SAMPLE REQUESTS
Ready-to-use curl commands: Seecurl.txtfor complete examples
| Method | Endpoint | Description | Authentication | Request Body |
|---|---|---|---|---|
| GET | / |
Health check endpoint | None | None |
| POST | /auth/register |
Register new user | None | username, email, password |
| POST | /auth/login |
Login user and get API key | None | username, password |
| POST | /auth/generate-api-key |
Generate new API key | Required | None |
| GET | /loads/ |
Get all loads | Required | None |
| POST | /loads/search |
Search loads by criteria | Required | origin_city, origin_state, destination_city, destination_state, earliest_time, earliest_time_date, latest_time, latest_time_date |
| GET | /carrier/?mc={mc_number} |
Check carrier MC number status | Required | None |
| POST | /call-results/ |
Create new call result | Required | load_id, mc_number, duration, result, sentiment, final_price, final_offer |
| GET | /call-results/ |
Get all call results | Required | None |
| GET | /booked-loads/ |
Get successfully booked loads | Required | None |
| POST | /negotiate-price |
Negotiate price between offered and negotiated | Required | offered_price, negotiated_price |
| POST | /populate |
Populate database with fake load data | Required | None |
- Create virtual environment:
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp env.example .env
# IMPORTANT -> Edit .env with your actual API keys. You will need database config and FMCSA API key- Run the server:
uvicorn app.main:app --reload- Check if running (replace port)
curl -X GET "http://localhost:8000/"- GitHub account
- Railway account (sign up at railway.app)
- FMCSA API key (get from FMCSA website)
- Go to railway.app and sign in
- Click "New Project"
- Select "Deploy from GitHub repo"
- Choose your HR-Case repository
- Railway will automatically detect it as a Python project
- In your Railway project dashboard, click "New"
- Select "Database" → "PostgreSQL"
- Railway will create a PostgreSQL instance
- Note the connection details (you'll need these)
-
In your Railway project, go to the "Variables" tab
-
Add these environment variables:
FMCSA_API_KEY=your_fmcsa_api_key_here DATABASE_URL= {INSERT shared variable {DATABASE_URL} with Postgres instance }Note: Railway automatically provides the
DATABASE_URLwhen you add a PostgreSQL service. You can find it in the PostgreSQL service's "Variables" tab. -
Optional variables (Railway sets these automatically):
PORT=8080 RAILWAY_ENVIRONMENT=production
- Railway will automatically deploy when you push to GitHub
- Or manually trigger deployment:
- Go to your service in Railway dashboard
- Click "Deploy" if needed