auth-server / README.md
kamau1's picture
Upload 10 files
7378c28 verified
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 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: Handles AI-related tasks
  • Scraper Server: Handles data scraping and processing
  • Frontend: React application hosted on Netlify