A fun holiday project that uses AI to generate personalized roast letters from Salty Open Source Santa based on your GitHub open source contributions. Find out if you're on the naughty or nice list! π
Built with β€οΈ by the Directus team
Introduction Β· Features Β· Tech Stack Β· Setup Guide Β·
Open Source Santa is a playful web application that analyzes GitHub profiles and generates AI-powered "naughty or nice" letters from Santa. Whether you want to check your own open source karma or roast a friend, Santa's got opinions about everyone's commits!
Learn how the project was built on the Directus Developer Blog.
- π Generate AI-powered roast letters from Santa based on GitHub public profile data
- π Check if you're on the naughty or nice list
- π Write letters for yourself or roast your friends
- π Beautiful particle snow effects and holiday theming
- π Fun sound effects
- π GitHub OAuth authentication
- πΌοΈ Dynamic OG image generation
- Nuxt 3 - Vue.js Framework
- Nuxt UI v3-alpha - UI Component Library
- Tailwind CSS v4-beta - Utility-first CSS
- VueUse - Vue Composition Utilities
- tsParticles - Particle Effects
- Vercel AI SDK - AI SDK
- Directus - Backend + CMS (Admin)
- Anthropic Claude - AI Text Generation
- PostgreSQL - Database
Clone the repository and navigate to the root directory.
git clone https://github.com/directus-labs/os-santa.git
cd os-santa
We recommend you checkout the Directus documentation for more information on how to setup and run Directus.
-
Create an account at Directus Cloud
-
Create a new trial project - choose the build from scratch option
-
Once created, note your project URL and login credentials.
-
Run the
directus-template-cli
tool to apply the template to your project. Replace the values with your specific project URL and login credentials.cd directus
npx directus-template-cli@latest apply --directusUrl="your_directus_url" --userEmail="your_email" --userPassword="your_password" --templateLocation="./template" --templateType="local"
-
Login to Directus and generate a static access token for the "Santa's Helper" user. Save the token for the environment variables.
DIRECTUS_SERVER_TOKEN=your_directus_token
-
Ensure you have docker installed and running on your machine. Install Docker
-
Start the Directus instance using Docker:
cd directus
docker-compose up -d
-
Run the
directus-template-cli
tool to apply the template to your project. Replace the values with your specific project details.npx directus-template-cli@latest apply --directusUrl="http://localhost:8055" --userEmail="[email protected]" --userPassword="d1r3ctus" --templateLocation="./template" --templateType="local"
-
Login to Directus and generate a static access token for the "Santa's Helper" user. Save the token for the environment variables.
DIRECTUS_SERVER_TOKEN=your_directus_token
-
Click "New OAuth App"
-
Fill in the application details:
- Application name: "Open Source Santa" (or your preferred name)
- Homepage URL:
http://localhost:3000
(development) or your production URL - Authorization callback URL:
http://localhost:3000/auth/github
-
Save the Client ID and Client Secret for environment variables
GITHUB_CLIENT_ID=your_github_client_id GITHUB_CLIENT_SECRET=your_github_client_secret
-
Click "Generate new token"
-
Fill in the token details:
- Note: "Open Source Santa GraphQL Access" (or your preferred note)
- Expiration: Choose an appropriate expiration time
- Repository access: Public Repositories (read-only)
-
Add the token to your environment variables:
GITHUB_TOKEN=your_github_token
-
Create an account at Anthropic
-
Generate an API key from your dashboard
-
Save the API key for environment variables
ANTHROPIC_API_KEY=your_anthropic_api_key
-
Install dependencies:
cd nuxt
pnpm i
-
Copy the example environment file:
cp .env.example .env
-
Fill in your environment variables:
# Directus Configuration DIRECTUS_URL=your_directus_url DIRECTUS_SERVER_TOKEN=your_directus_token # AI Generation ANTHROPIC_API_KEY=your_anthropic_api_key # Site Configuration NUXT_PUBLIC_SITE_URL=http://localhost:3000 NUXT_SESSION_PASSWORD="password-with-at-least-32-characters" SALT="some-random-salt-string" # Authentication GITHUB_TOKEN=your_github_token_for_graphql_api GITHUB_CLIENT_ID=your_github_client_id GITHUB_CLIENT_SECRET=your_github_client_secret # Analytics (Optional) POSTHOG_API_KEY=your_posthog_api_key POSTHOG_API_HOST=your_posthog_host
Note: PostHog analytics is optional and will be disabled in development mode. If you don't need product analytics, you can skip these environment variables.
-
Generate Directus types:
NOTE: Your Directus instance must be running for type generation to work.
pnpm generate:types
-
Start the development server:
pnpm dev
-
Visit
http://localhost:3000
in your browser
If you're running into CORS issues with Directus, ensure your Directus instance has CORS properly configured. For development, you can add the following to your Directus environment:
Learn more about CORS in Directus.
CORS_ENABLED=true
CORS_ORIGIN=http://localhost:3000
- Ensure your GitHub OAuth callback URL exactly matches your application setup
- Verify your Directus token has admin access
- Check that all environment variables are properly set
For community help or support with Directus itself, please see the Directus Discord server.
- Directus Discord β Join over 10k+ developers and community members to ask questions and live discussion around Directus.
Here's how you can contribute:
- Open an issue if you believe you've encountered a bug.
- Please open an issue before submitting any PRs for new features or improvements.
- Our other awesome core team members at Directus who helped test and provide feedback.
- joshwcomeau for the idea and logic behind the spice-meter / like button.
- codenoid/github-roast for additional inspiration of the GitHub roast idea.
This project is open source and available under the MIT License. See the LICENSE file for more details.