A modern web application built with Next.js, featuring AT Protocol integration, social media interaction, and dynamic content generation.
- 🚀 Next.js 14 with App Router
- 🎨 Tailwind CSS for styling
- 🔒 AT Protocol integration for decentralized social features
- 📊 Prisma ORM with PostgreSQL database
- ⚡ Redis for caching and session management
- 🎯 TypeScript for type safety
- 🎨 Konva.js for canvas graphics and image manipulation
- 📱 Responsive design with mobile-first approach
- 🌙 Dark/Light mode support
Before you begin, ensure you have the following installed on your system:
- Node.js (version 18 or higher)
- Bun (recommended) or npm/yarn
- PostgreSQL (version 12 or higher)
- Redis (version 6 or higher)
- Git
-
Clone the repository
git clone https://github.com/pirmax/skycle.git cd skycle
-
Install dependencies
# Using Bun (recommended) bun install # Or using npm npm install # Or using yarn yarn install
-
Set up environment variables
cp .env.example .env
Edit the
.env
file and configure the following variables:# Bluesky/AT Protocol credentials BSKY_ACCOUNT_HANDLE="your-handle.bsky.social" BSKY_ACCOUNT_PASSWORD="your-app-password" # Security COOKIE_PASSWORD="your-secure-cookie-password-min-32-chars" # Application URL NEXT_PUBLIC_URL="http://localhost:3000" # Google Analytics (optional) NEXT_PUBLIC_GA_MEASUREMENT_ID="G-XXXXXXXXXX" # Database DATABASE_URL="postgres://username:password@localhost:5432/skycle" # Redis REDIS_URL="redis://localhost:6379/0" # Unsplash API (optional) UNSPLASH_ACCESS_KEY="your-unsplash-access-key" UNSPLASH_SECRET_KEY="your-unsplash-secret-key"
-
Create a PostgreSQL database
# Connect to PostgreSQL psql -U postgres # Create database CREATE DATABASE skycle; # Exit PostgreSQL \q
-
Generate Prisma client
bun run prisma:generate
-
Run database migrations
bun run prisma:migration
Make sure Redis is running on your system:
# Start Redis (macOS with Homebrew)
brew services start redis
# Start Redis (Ubuntu/Debian)
sudo systemctl start redis-server
# Start Redis (Docker)
docker run -d -p 6379:6379 redis:alpine
-
Start the development server
bun run dev
-
Open your browser Navigate to http://localhost:3000
The application will automatically reload when you make changes to the code.
bun run dev
- Start the development serverbun run build
- Build the application for productionbun run start
- Start the production serverbun run lint
- Run ESLintbun run lint:fix
- Run ESLint and fix issues automaticallybun run format
- Format code with Prettierbun run prisma:generate
- Generate Prisma clientbun run prisma:migration
- Run database migrationsbun run prisma:migrate
- Push database schema changes
skycle/
├── prisma/ # Database schema and migrations
│ ├── schema.prisma # Prisma schema definition
│ └── migrations/ # Database migration files
├── public/ # Static assets
├── src/
│ ├── actions/ # Server actions
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ │ ├── ui/ # Reusable UI components
│ │ ├── konva/ # Canvas/graphics components
│ │ └── sheets/ # Sheet/modal components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility libraries
│ ├── providers/ # React context providers
│ ├── styles/ # Global styles
│ └── utils/ # Utility functions
├── components.json # shadcn/ui configuration
├── tailwind.config.ts # Tailwind CSS configuration
└── next.config.js # Next.js configuration
- Next.js 14 - React framework with App Router
- React 18 - UI library
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful UI components
- Radix UI - Unstyled, accessible UI primitives
- Prisma - Modern database toolkit
- PostgreSQL - Relational database
- Redis - In-memory data store
- Konva.js - 2D canvas graphics library
- react-konva - React bindings for Konva
- Sharp - Image processing
- AT Protocol - Decentralized social networking protocol
- Iron Session - Secure session management
- Biome - Fast formatter and linter
- ESLint - Code linting
- Prettier - Code formatting
The application requires several environment variables to function properly:
Variable | Description | Required |
---|---|---|
BSKY_ACCOUNT_HANDLE |
Your Bluesky handle | Yes |
BSKY_ACCOUNT_PASSWORD |
Your Bluesky app password | Yes |
COOKIE_PASSWORD |
Secure password for cookie encryption | Yes |
NEXT_PUBLIC_URL |
Application URL | Yes |
DATABASE_URL |
PostgreSQL connection string | Yes |
REDIS_URL |
Redis connection string | Yes |
NEXT_PUBLIC_GA_MEASUREMENT_ID |
Google Analytics ID | No |
UNSPLASH_ACCESS_KEY |
Unsplash API access key | No |
UNSPLASH_SECRET_KEY |
Unsplash API secret key | No |
The application uses Prisma with PostgreSQL. Key models include:
- Version - Stores generated content versions
- AuthState - Manages authentication states
- AuthSession - Handles user sessions
bun run build
bun run start
- Push your code to GitHub
- Connect your repository to Vercel
- Set up environment variables in Vercel dashboard
- Deploy automatically on push to main branch
The application can be deployed to any platform that supports Node.js applications:
- Railway
- Render
- DigitalOcean App Platform
- AWS
- Google Cloud Platform
Make sure to:
- Set up environment variables
- Configure PostgreSQL and Redis instances
- Run database migrations
- Build the application
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the GPL v3.0 - see the LICENSE file for details.
If you encounter any issues or have questions, please:
- Check the existing issues
- Create a new issue if your problem isn't already reported
- Provide as much detail as possible, including:
- Node.js version
- Operating system
- Error messages
- Steps to reproduce
If you find this project helpful and would like to support its development, please consider sponsoring me on GitHub:
Your support helps me:
- 🚀 Continue developing and maintaining this project
- 🛠️ Add new features and improvements
- 🐛 Fix bugs and provide support
- 📚 Create better documentation and tutorials
- ☕ Stay caffeinated during late-night coding sessions
- Next.js for the amazing React framework
- Tailwind CSS for the utility-first CSS framework
- Prisma for the excellent database toolkit
- AT Protocol for decentralized social networking
- shadcn/ui for beautiful UI components