This website is the Bluesky raffle to gift our sponsor prizes.
The application can be packaged as a jar application, the classic mode, or as a native application, the native mode.
Compile project with Maven:
mvn packageCompile project with Maven using native profile:
mvn package -PnativeFor UI testing and development, you can run the server with mock data instead of requiring real Bluesky credentials:
# Run classic mode with mock data
java -Dbluesky.mock.enabled=true -jar target/quarkus-app/quarkus-run.jar
# Run native mode with mock data
target/bluesky-raffle-1.0.0-SNAPSHOT-runner -Dbluesky.mock.enabled=trueMock mode uses pre-recorded API responses from src/test/resources/bluesky-mocks/ by default. You can customize the mock file paths:
# Use custom mock files
java -Dbluesky.mock.enabled=true \
-Dbluesky.mock.session.file=path/to/create-session-response.json \
-Dbluesky.mock.search.file=path/to/search-response-with-images.json \
-jar target/quarkus-app/quarkus-run.jarThis allows Playwright and other UI testing tools to work without needing actual Bluesky credentials. The mock data provides stable, predictable results for consistent testing and directly uses files generated by the mock generator (see Testing section below).
Run providing Bluesky client credentials using CLI arguments:
# Run classic mode (Quarkus 3.x uses quarkus-run.jar)
java -Dbluesky.identifier=<your-handle-or-email> -Dbluesky.password=<your-app-password> -jar target/quarkus-app/quarkus-run.jar
# Run native mode
target/bluesky-raffle-1.0.0-SNAPSHOT-runner -Dbluesky.identifier=<your-handle-or-email> -Dbluesky.password=<your-app-password>Run providing Bluesky client credentials using environment variables:
export bluesky.identifier=<your-handle-or-email>
export bluesky.password=<your-app-password>
# Run classic mode
java -jar target/quarkus-app/quarkus-run.jar
# Run native mode
target/bluesky-raffle-1.0.0-SNAPSHOT-runnerNote: You need to generate an app password from your Bluesky account settings to use with this application.
For rapid development with automatic reloading, use Quarkus dev mode:
# With mock data (no credentials needed)
mvn quarkus:dev -Dbluesky.mock.enabled=true
# With real Bluesky API
mvn quarkus:dev -Dbluesky.identifier=<your-handle-or-email> -Dbluesky.password=<your-app-password>The project uses WireMock to mock Bluesky API and oEmbed API responses in tests. To generate fresh mock data:
-
Set your Bluesky credentials (using environment variables or system properties)
-
Run the mock data generator:
mvn test -Dtest=MockDataGenerator \ -Dbluesky.identifier=<your-handle-or-email> \ -Dbluesky.password=<your-app-password>
-
Mock files will be generated in:
src/test/resources/bluesky-mocks/create-session-response.json- Bluesky authentication responsesearch-response-with-images.json- Search results with image postssearch-response-no-images.json- Search results without imagesoembed-response.json- oEmbed API response
-
Sensitive data is automatically sanitized:
- Authentication tokens (
accessJwt,refreshJwt) are replaced with placeholders - User emails are replaced with
test@example.com - User handles are anonymized (e.g.,
testuser123.bsky.social) - Personal mentions (@username) are replaced with generic names
- Avatar URLs are replaced with placeholders
- DIDs are preserved (needed for blob URL construction in tests)
- Authentication tokens (
-
Run the tests:
mvn test
Note: After sanitization, mock files are safe to commit to git without exposing personal credentials or information.
The test infrastructure mocks:
- Bluesky API:
POST /xrpc/com.atproto.server.createSession- AuthenticationGET /xrpc/app.bsky.feed.searchPosts- Post search
- oEmbed API:
GET https://embed.bsky.app/oembed- Post embedding
To update mock data with current API responses:
- Delete existing mock files from
src/test/resources/bluesky-mocks/ - Re-run the mock generator as shown above
- Commit the updated mock files if API response structure has changed
This ensures tests remain stable while allowing periodic updates to reflect API changes.
The application can be deployed using Docker. A Dockerfile is provided that uses a multi-stage build to create an optimized container image.
docker build -t bluesky-raffle .With Mock Data (No Credentials Required):
docker run -p 8080:8080 -e bluesky.mock.enabled=true bluesky-raffleWith Real Bluesky API:
docker run -p 8080:8080 \
-e bluesky.identifier=<your-handle-or-email> \
-e bluesky.password=<your-app-password> \
bluesky-raffleThe application will be accessible at http://localhost:8080
Render.com makes it easy to deploy containerized applications. Follow these steps:
- A Render.com account (sign up at https://render.com)
- Your Bluesky credentials:
- Handle or Email: Your Bluesky account identifier (e.g.,
yourname.bsky.socialoryour@email.com) - App Password: Generate this from your Bluesky account settings at https://bsky.app/settings/app-passwords
- Handle or Email: Your Bluesky account identifier (e.g.,
Option 1: One-Click Deployment (Recommended)
This repository includes a render.yaml file for easy deployment:
-
Fork or push this repository to your GitHub account
-
Click the "Deploy to Render" button or manually:
- Go to your Render dashboard
- Click "New +" and select "Blueprint"
- Connect your GitHub repository
- Render will automatically detect the
render.yamlfile
-
Set your Bluesky credentials:
- In the Render dashboard, navigate to your service
- Go to "Environment" section
- Set values for:
bluesky.identifier: Your Bluesky handle or emailbluesky.password: Your Bluesky app password
-
Deploy: Render will automatically build and deploy your application
Option 2: Manual Deployment
-
Fork or push this repository to your GitHub account
-
Create a new Web Service on Render.com:
- Go to your Render dashboard
- Click "New +" and select "Web Service"
- Connect your GitHub repository
-
Configure the service:
- Name:
bluesky-raffle(or your preferred name) - Environment:
Docker - Branch:
main(or your default branch) - Instance Type: Choose based on your needs (Free tier works fine for testing)
- Name:
-
Add Environment Variables:
Click "Add Environment Variable" and add the following:
Key Value Description bluesky.identifieryour-handle-or-emailYour Bluesky handle (e.g., yourname.bsky.social) or emailbluesky.passwordyour-app-passwordYour Bluesky app password (generate from https://bsky.app/settings/app-passwords) Optional: For testing with mock data instead:
Key Value Description bluesky.mock.enabledtrueUse mock data instead of real Bluesky API -
Deploy:
- Click "Create Web Service"
- Render will automatically build and deploy your application
- Once deployed, your app will be available at:
https://your-service-name.onrender.com
- App Passwords: Never use your main Bluesky password. Always generate an app-specific password from your Bluesky account settings.
- Free Tier Limitations: Free tier services on Render.com may spin down after periods of inactivity and take 30-60 seconds to restart.
- Environment Variables: Environment variables are securely stored and not exposed in logs.
- HTTPS: Render automatically provides HTTPS for your application.
- Auto-Deploy: Enable auto-deploy in Render settings to automatically redeploy when you push to your repository.
If your deployment fails, check the following:
- Build logs: Review the build logs in the Render dashboard for errors
- Runtime logs: Check the runtime logs for application errors
- Environment variables: Verify that
bluesky.identifierandbluesky.passwordare correctly set - Port configuration: The application runs on port 8080 by default (Render auto-detects this from the Dockerfile)
The Docker image can also be deployed to other container platforms:
- Heroku: Use the Container Registry
- Google Cloud Run: Deploy container images directly
- AWS ECS/Fargate: Container orchestration on AWS
- Azure Container Instances: Serverless containers on Azure
- DigitalOcean App Platform: Similar to Render.com
- Fly.io: Edge deployment platform
For all platforms, remember to set the bluesky.identifier and bluesky.password environment variables.

