A collaborative pixel art creation and competition platform built with SwiftUI and Firebase.
PixelArt is an iOS application that allows users to create pixel art, participate in themed competitions, and share their artwork with the community. The app features a real-time drawing canvas, competition system, social features like following and liking, and offline-first capabilities.
- Pixel Canvas: Interactive drawing canvas with customizable grid sizes
- Color Palette: Predefined color palettes for competitions and free drawing
- Drawing Tools: Pencil, eraser, and grid toggle functionality
- Zoom & Pan: Intuitive canvas navigation with pinch-to-zoom and pan gestures
- Real-time Updates: Live pixel changes with smooth performance
- Themed Competitions: Participate in time-limited competitions with specific topics
- Color Constraints: Use predefined color palettes for fair competition
- Scoring Phase: Vote and rate other participants' artwork
- Timer System: Real-time countdown for competition phases
- Past Competitions: Browse and view historical competition results
- Automated Management: Cloud Functions handle competition lifecycle automatically
- User Profiles: Customizable profiles with pixel art avatars
- Follow System: Follow other artists and see their latest work
- Like System: Like and appreciate artwork from the community
- User Discovery: Browse and discover new artists
- Activity Feed: View recent artwork from followed users
- Core Data Integration: Local storage for artwork and user data
- Sync Management: Automatic synchronization when online
- Offline Creation: Create artwork without internet connection
- Conflict Resolution: Smart handling of data conflicts
- Pixel Art Aesthetic: Consistent pixel art theme throughout the app
- Custom Fonts: Micro5 pixel font for authentic retro feel
- Smooth Navigation: Tab-based navigation with custom pixel-style UI
- Network Awareness: Graceful handling of connectivity issues
PixelArt/
βββ Core/ # Business logic and data models
β βββ AppUser/ # User management
β βββ Artwork/ # Artwork models and services
β βββ Competition/ # Competition system
β βββ Auth/ # Authentication
β βββ DataSync/ # Synchronization logic
β βββ Navigation/ # Routing system
βββ Features/ # Feature-specific views and view models
β βββ DrawingCanvas/ # Drawing functionality
β βββ Competition/ # Competition UI
β βββ Profile/ # User profiles
β βββ Artworks/ # Artwork gallery
βββ Shared/ # Shared utilities and components
β βββ UI/ # Reusable UI components
β βββ Extensions/ # Swift extensions
β βββ Constants/ # App constants
βββ Resources/ # Assets, fonts, and data models
- SwiftUI: Modern declarative UI framework
- Firebase: Backend services (Auth, Firestore, Cloud Functions)
- Core Data: Local data persistence
- UIKit Integration: Custom drawing canvas implementation
- Cloud Functions: Automated competition management and scheduling
- Competition: Active competitions, voting, and results
- Artworks: Personal and community artwork gallery
- Profile: User profile, settings, and social features
- DrawingCanvas: Main drawing interface
- CompetitionView: Competition participation and voting
- ProfileView: User profile and settings
- ArtworksView: Artwork gallery and discovery
The project follows a clean architecture pattern with clear separation of concerns:
- Models: Data structures and business logic
- Services: Business logic and external integrations
- Repositories: Data access layer
- ViewModels: UI logic and state management
- Views: SwiftUI user interface components
- MVVM: Model-View-ViewModel architecture
- Repository Pattern: Abstracted data access
- Dependency Injection: Service injection for testability
- Protocol-Oriented Programming: Interface-based design
The app uses a consistent pixel art theme with:
- Custom pixel fonts (Micro5)
- Pixel-style UI components
- Retro color schemes
- Custom button and background modifiers
The drawing canvas supports:
- Multiple grid sizes (16x16, 32x32, 33x33, etc.)
- Custom color palettes
- Various drawing operations
- Real-time collaboration features
The application includes automated Cloud Functions for competition management:
- Competition Scheduling: Automated 24-hour competition cycles
- Status Transitions: Automatic progression from active β scoring β past
- Like Rights Management: Automated distribution of voting rights
- Artwork Archiving: Automatic cleanup and archiving of competition entries
// Automated competition management
const checkCompetitionsSchedule = onSchedule({
schedule: "every 24 hours",
timeZone: "Europe/Amsterdam",
region: "europe-west3"
}, async () => {
// Handle competition status transitions
// Manage voting rights distribution
// Archive completed competitions
});