Spaces:
Running
Running
metadata
title: Seamo Auth Server
emoji: 🔐
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: true
Seamo Auth Server
This is the authentication and user management service component of the Seamo platform, an AI-powered ocean intelligence application. This server handles user authentication, project management, and other non-AI related tasks.
Features
- User authentication with JWT tokens
- User registration and management
- Project creation and management
- Research journal entries
- Secure API access
API Endpoints
Health Check
GET /health
: Check if the server is running
Authentication
POST /api/auth/register
: Register a new userPOST /api/auth/login
: Login and get access tokensPOST /api/auth/refresh
: Refresh access tokenGET /api/auth/me
: Get current user information
Projects
GET /api/projects/
: Get a list of user's projectsPOST /api/projects/
: Create a new projectGET /api/projects/{project_id}
: Get a specific projectPATCH /api/projects/{project_id}
: Update a projectDELETE /api/projects/{project_id}
: Delete a project
Journals
POST /api/journals/
: Create a new journal entryGET /api/journals/project/{project_id}
: Get journal entries for a projectGET /api/journals/{journal_id}
: Get a specific journal entryPATCH /api/journals/{journal_id}
: Update a journal entryDELETE /api/journals/{journal_id}
: Delete a journal entry
Technology Stack
- FastAPI: High-performance API framework
- Turso: Edge database for reliable and scalable data storage
- Python 3.10
- JWT: For secure authentication
- Docker: For containerization and deployment
Environment Variables
The following environment variables need to be set:
TURSO_DATABASE_URL
: Turso database URLTURSO_AUTH_TOKEN
: Turso authentication tokenJWT_SECRET
: Secret key for JWT token generationFRONTEND_URL
: URL of the frontend applicationFRONTEND_DOMAIN
: Domain of the frontend applicationAI_SERVER_URL
: URL of the AI serverSCRAPER_SERVER_URL
: URL of the scraper server
Deployment
This server is deployed as a Docker container on Hugging Face Spaces. It communicates with the other Seamo services (AI Server and Scraper Server) to provide a complete solution.
Related Services
- AI Server: Handles AI-related tasks
- Scraper Server: Handles data scraping and processing
- Frontend: React application hosted on Netlify