Snowgoose is a powerful Next.js 14 application that provides a unified interface for interacting with multiple AI services. It simplifies the complexity of managing different AI service integrations by offering a standardized, feature-rich frontend while maintaining provider-specific capabilities. It is designed to be deployed using Docker.
- 🤖 Multi-Provider Support
- OpenAI
- Anthropic
- Google AI
- OpenRouter
- Extensible for additional providers
- 💬 Rich Interaction Capabilities
- Text chat with AI models
- Vision/image analysis
- Image generation
- Thinking mode support
- Conversation history management
- 🎭 Customization Options
- Custom personas (system prompts) for different interaction styles
- Configurable output formats (Markdown, HTML, plain text)
- MCP tool integration
| AI Provider | Chat | Vision | Image Gen | Thinking/Reasoning | MCP Use |
|---|---|---|---|---|---|
| Anthropic | ✅ | ✅ | N/A | ✅ | ✅ |
| OpenAI | ✅ | ✅ | ✅ | ✅ | 🚫 |
| ✅ | ✅ | ✅ | 🚫 | 🚫 | |
| OpenRouter | ✅ | ✅ | N/A | ✅ | 🚫 |
- Test coverage needs improvement
- Performance optimization is ongoing (Server Actions, DB queries)
- Logging and monitoring systems need enhancement/implementation
- Need to implement automatic deletion of saved Vision files
- Potential bug when loading history conversations created before a model was marked as 'thinking'
- API keys for desired AI services (OpenAI, Anthropic, Google AI, Openrouter)
- Supabase account:
- Sign up for a free account at supabase.com.
- Used for Authentication, Storage (Vision feature), and the Production Database.
- Create a Supabase project, which includes a PostgreSQL database.
- Create a private storage bucket (e.g.,
snowgoose-vision) and configure policies.- Hint: Use the "Give users access to only their own top level folder named as uid" template policy, as this matches Snowgoose's file saving structure.
- Docker and Docker Compose installed (for local development environment).
-
Clone the repository:
git clone https://github.com/yourusername/snowgoose.git # Replace with actual repo URL cd snowgoose
-
Set up environment variables:
Copy the example file:
cp env.local.example .env.local
Edit
.env.localwith your configuration details. This file is used for local Docker development:# Database (For Local Docker Development - Points to the DB service in docker-compose.yml) DATABASE_URL="postgresql://postgres:yoursecurepassword@db:5432/snowgoose?schema=public" # Default credentials from docker-compose.yml # Supabase (Authentication & Storage) NEXT_PUBLIC_SUPABASE_URL="https://your-project-id.supabase.co" NEXT_PUBLIC_SUPABASE_ANON_KEY="your-supabase-anon-key" SUPABASE_SERVICE_ROLE_KEY="your-supabase-service-role-key" # Needed for some server-side operations like deleting storage objects SUPABASE_VISION_STORAGE_BUCKET=snowgoose-vision # Or your chosen bucket name # AI Services OPENAI_API_KEY="sk-..." ANTHROPIC_API_KEY="sk-..." GOOGLE_AI_API_KEY="..." OPENROUTER_API_KEY="..." # If using OpenRouter # MCP Configuration (Optional, if using local MCP servers) # MCP_CONFIG_PATH="/path/to/your/mcp/config.json" # Production Database (Used when deploying, set via secrets, not directly in .env files) # PRODUCTION_DATABASE_URL="postgresql://supabase_user:password@db.project-id.supabase.co:5432/postgres"
Note: For local development,
DATABASE_URLpoints to the PostgreSQL container managed by Docker Compose. For production deployment (e.g., on Fly.io), you will set theDATABASE_URLsecret to your Supabase database connection string.
-
Build and start the development containers:
This command uses
docker-compose.ymlto build the necessary images (if they don't exist) and start the application container (app) and the local PostgreSQL database container (db). It mounts the local codebase into theappcontainer for hot-reloading.docker compose up --build
-
Initialize the database (run in a separate terminal):
Once the containers are running, execute the Prisma migration command inside the
appcontainer:docker compose exec app npx prisma migrate devYou might also want to seed the database (if seed script exists):
docker compose exec app npx prisma db seed -
Access the application:
The application should now be available at
http://localhost:3000. Changes made to the code locally will trigger a rebuild and reload in the container.
This project is configured for deployment to Fly.io using the provided Dockerfile and fly.toml, connecting to a Supabase database for production data.
-
Prerequisites:
- Ensure you have a Supabase project created (includes a PostgreSQL database).
- Install
flyctl:curl -L https://fly.io/install.sh | sh - Login:
flyctl auth login - Create Fly app (if first time):
flyctl launch(Reviewfly.toml).
-
Set Secrets: Configure required environment variables as secrets in Fly.io. Crucially, set
DATABASE_URLto your Supabase database connection string. You can find this in your Supabase project settings (Database -> Connection string -> URI).# Database Secret (IMPORTANT!) flyctl secrets set DATABASE_URL="postgresql://supabase_user:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres" # Other Secrets flyctl secrets set NEXT_PUBLIC_SUPABASE_URL="https://[YOUR-PROJECT-ID].supabase.co" \ NEXT_PUBLIC_SUPABASE_ANON_KEY="[YOUR-SUPABASE-ANON-KEY]" \ SUPABASE_SERVICE_ROLE_KEY="[YOUR-SUPABASE-SERVICE-ROLE-KEY]" \ SUPABASE_VISION_STORAGE_BUCKET="snowgoose-vision" \ OPENAI_API_KEY="sk-..." \ ANTHROPIC_API_KEY="sk-..." \ GOOGLE_AI_API_KEY="..." \ # Add OPENROUTER_API_KEY if used # Add MCP_CONFIG_PATH if used and relevant in production
-
Deploy: Fly.io uses the
Dockerfileto build and deploy your application.flyctl deploy
-
Run Database Migrations (Post-Deploy): Connect to a running instance and apply migrations to your Supabase database:
flyctl ssh console --command "npx prisma migrate deploy"This command runs inside the Fly container but targets the production
DATABASE_URL(Supabase) you set via secrets. -
Monitor:
- Check status:
flyctl status - View logs:
flyctl logs
- Check status:
Note: Hosting on platforms like Vercel is not recommended due to the MCP client implementation requiring a stateful server environment.
- Next.js 14 App Router
- Server Components and Server Actions
- Prisma ORM for database operations
- Repository pattern for data access
- Factory pattern for AI vendor integration
- MCP server integration
- Development Environment: Docker Compose (App + Postgres DB)
- Production Environment: Fly.io (App Container) + Supabase (Postgres DB, Auth, Storage)
Contributions are welcome! Please feel free to submit pull requests or open issues.
This project is licensed under the MIT License - see the LICENSE file for details.
