Spaces:
Running
Running
File size: 2,562 Bytes
17c6f16 7378c28 17c6f16 7378c28 17c6f16 7378c28 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
---
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 user
- `POST /api/auth/login`: Login and get access tokens
- `POST /api/auth/refresh`: Refresh access token
- `GET /api/auth/me`: Get current user information
### Projects
- `GET /api/projects/`: Get a list of user's projects
- `POST /api/projects/`: Create a new project
- `GET /api/projects/{project_id}`: Get a specific project
- `PATCH /api/projects/{project_id}`: Update a project
- `DELETE /api/projects/{project_id}`: Delete a project
### Journals
- `POST /api/journals/`: Create a new journal entry
- `GET /api/journals/project/{project_id}`: Get journal entries for a project
- `GET /api/journals/{journal_id}`: Get a specific journal entry
- `PATCH /api/journals/{journal_id}`: Update a journal entry
- `DELETE /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 URL
- `TURSO_AUTH_TOKEN`: Turso authentication token
- `JWT_SECRET`: Secret key for JWT token generation
- `FRONTEND_URL`: URL of the frontend application
- `FRONTEND_DOMAIN`: Domain of the frontend application
- `AI_SERVER_URL`: URL of the AI server
- `SCRAPER_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](https://huggingface.co/spaces/seamo-ai/ai-server): Handles AI-related tasks
- [Scraper Server](https://huggingface.co/spaces/seamo-ai/scraper-server): Handles data scraping and processing
- Frontend: React application hosted on Netlify
|