EspaΓ±a Decide es una aplicaciΓ³n mΓ³vil de participaciΓ³n ciudadana que ofrece a los ciudadanos la posibilidad de para crear, votar y discutir propuestas sobre temas de interΓ©s pΓΊblico. Construida con tecnologΓa nativa multiplataforma, permite a los usuarios participar activamente en la democracia desde sus dispositivos Android e iOS.
La aplicaciΓ³n facilita el debate democrΓ‘tico organizado por categorΓas como EconomΓa, **Sanidad **, EducaciΓ³n, Medio Ambiente, Justicia y mΓ‘s, permitiendo que las voces de los ciudadanos sean escuchadas en tiempo real.
- π³οΈ Sistema de VotaciΓ³n: Vota a favor o en contra de propuestas con un sistema intuitivo de upvote/downvote
- π CreaciΓ³n de Propuestas: Cualquier usuario puede crear propuestas con tΓtulo y descripciΓ³n detallada
- π·οΈ CategorΓas TemΓ‘ticas: Propuestas organizadas por Γ‘reas (economΓa, sanidad, educaciΓ³n, etc.)
- β‘ Actualizaciones en Tiempo Real: SincronizaciΓ³n instantΓ‘nea de votos y nuevas propuestas vΓa WebSockets
- π AutenticaciΓ³n Segura: Sistema de login con email/contraseΓ±a y Google OAuth
- π Ranking por Popularidad: Las propuestas se ordenan por votos netos (upvotes - downvotes)
- π¨ DiseΓ±o Material 3: Interfaz moderna con soporte para tema claro/oscuro
- π Multiplataforma: Misma experiencia en Android e iOS con cΓ³digo compartido
π§ PrΓ³ximamente: Capturas de las pantallas principales (CategorΓas, Lista de Propuestas, Detalle, CreaciΓ³n)
La aplicaciΓ³n estarΓ‘ disponible prΓ³ximamente en:
- π± Google Play Store: Enlace prΓ³ximamente
- π Apple App Store: Enlace prΓ³ximamente
SpainDecides estΓ‘ construido con tecnologΓas de vanguardia:
| Componente | TecnologΓa |
|---|---|
| Lenguaje | Kotlin 2.2.20 |
| Framework UI | Compose Multiplatform 1.9.1 |
| Arquitectura | MVVM + Repository Pattern |
| Backend | Supabase (PostgreSQL + Auth + Realtime) |
| Networking | Ktor Client 3.0.3 |
| InyecciΓ³n Dependencias | Koin 4.1.1 |
| NavegaciΓ³n | Jetpack Navigation Compose 2.8.0 |
| GestiΓ³n Estado | Kotlin Coroutines + StateFlow |
| SerializaciΓ³n | Kotlinx Serialization |
La aplicaciΓ³n sigue el patrΓ³n MVVM (Model-View-ViewModel) con arquitectura limpia en capas:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PRESENTATION LAYER β
β ββββββββββββββββ ββββββββββββββββββββββββββββ β
β β Compose UI β ββββββββΊ β ViewModels β β
β β (Screens) β β (StateFlow + Coroutines)β β
β ββββββββββββββββ ββββββββββββ¬ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β DOMAIN LAYER β β
β ββββββββββββββββββββββΌβββββββββββββββ β
β β Repository Interfaces β β
β β (Abstraction Layer) β β
β βββββββββββββββββββββββ¬ββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β DATA LAYER β β
β βββββββββββββββββββββββββββββββββββββ β β
β β Repository Implementations β β β
β ββββββββββ¬βββββββββββββββββββββββββββ β β
β β β β
β ββββββββββΌββββββββββ βββββββββββββββΌβββββββββββββββ β
β β Ktor Client β β Supabase Client β β
β β (HTTP/REST) β β (Auth + Realtime) β β
β ββββββββββββββββββββ ββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββ
β Supabase Backend β
β - PostgreSQL Database β
β - Authentication β
β - Realtime (WebSockets) β
β - RLS Policies β
ββββββββββββββββββββββββββββ
Flujo de Datos:
- UI β El usuario interactΓΊa con Composables
- ViewModel β Gestiona el estado y ejecuta lΓ³gica de negocio
- Repository β Abstrae el origen de datos
- API/Database β Ktor Client realiza peticiones HTTP a Supabase
- Realtime Updates β WebSockets notifican cambios en tiempo real
- State Update β StateFlow emite nuevos estados β UI se recompone
Spain Decides is a citizen participation mobile application that empowers citizens to create, vote, and discuss proposals on public interest topics. Built with native multiplatform technology, it enables users to actively participate in democracy from their Android and iOS devices.
The app facilitates democratic debate organized by categories such as Economy, Healthcare, * Education*, Environment, Justice, and more, allowing citizens' voices to be heard in real-time.
- π³οΈ Voting System: Vote for or against proposals with an intuitive upvote/downvote system
- π Proposal Creation: Any user can create proposals with title and detailed description
- π·οΈ Thematic Categories: Proposals organized by areas (economy, healthcare, education, etc.)
- β‘ Real-time Updates: Instant synchronization of votes and new proposals via WebSockets
- π Secure Authentication: Login system with email/password and Google OAuth
- π Popularity Ranking: Proposals sorted by net votes (upvotes - downvotes)
- π¨ Material Design 3: Modern interface with light/dark theme support
- π Multiplatform: Same experience on Android and iOS with shared codebase
π§ Coming soon: Screenshots of main screens (Categories, Proposal List, Detail, Creation)
The application will be available soon on:
- π± Google Play Store: Link coming soon
- π Apple App Store: Link coming soon
SpainDecides is built with cutting-edge technologies:
| Component | Technology |
|---|---|
| Language | Kotlin 2.2.20 |
| UI Framework | Compose Multiplatform 1.9.1 |
| Architecture | MVVM + Repository Pattern |
| Backend | Supabase (PostgreSQL + Auth + Realtime) |
| Networking | Ktor Client 3.0.3 |
| Dependency Injection | Koin 4.1.1 |
| Navigation | Jetpack Navigation Compose 2.8.0 |
| State Management | Kotlin Coroutines + StateFlow |
| Serialization | Kotlinx Serialization |
The application follows the MVVM (Model-View-ViewModel) pattern with clean architecture layers:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PRESENTATION LAYER β
β ββββββββββββββββ ββββββββββββββββββββββββββββ β
β β Compose UI β ββββββββΊ β ViewModels β β
β β (Screens) β β (StateFlow + Coroutines)β β
β ββββββββββββββββ ββββββββββββ¬ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββ
β DOMAIN LAYER β β
β ββββββββββββββββββββββΌβββββββββββββββββ β
β β Repository Interfaces β β
β β (Abstraction Layer) β β
β βββββββββββββββββββββββ¬ββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β DATA LAYER β β
β βββββββββββββββββββββββββββββββββββββ β β
β β Repository Implementations β β β
β ββββββββββ¬βββββββββββββββββββββββββββ β β
β β β β
β ββββββββββΌββββββββββ βββββββββββββββΌβββββββββββββββ β
β β Ktor Client β β Supabase Client β β
β β (HTTP/REST) β β (Auth + Realtime) β β
β ββββββββββββββββββββ ββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββ
β Supabase Backend β
β - PostgreSQL Database β
β - Authentication β
β - Realtime (WebSockets) β
β - RLS Policies β
ββββββββββββββββββββββββββββ
Data Flow:
- UI β User interacts with Composables
- ViewModel β Manages state and executes business logic
- Repository β Abstracts data source
- API/Database β Ktor Client makes HTTP requests to Supabase
- Realtime Updates β WebSockets notify changes in real-time
- State Update β StateFlow emits new states β UI recomposes
- Android Studio Ladybug | 2024.2.1 or later
- Xcode 15.0+ (for iOS development on macOS)
- JDK 17 or later
- Kotlin 2.2.20 (included in project)
-
Clone the repository
git clone https://github.com/YourUsername/SpainDecides.git cd SpainDecides -
Open in Android Studio
- Open Android Studio
- Select "Open an Existing Project"
- Navigate to the cloned
SpainDecidesfolder
-
Sync Gradle
- Android Studio will automatically sync Gradle dependencies
- Wait for the sync to complete
Option 1: Using Android Studio
- Select the
composeApprun configuration - Click the "Run" button (or press
Shift + F10)
Option 2: Using Terminal
# Build debug APK
./gradlew :composeApp:assembleDebug
# Install on connected device/emulator
./gradlew :composeApp:installDebugRun on emulator:
# Start emulator (if not running)
emulator -avd Pixel_8_API_35
# Install and launch
./gradlew :composeApp:installDebug
adb shell am start -n com.apptolast.spaindecides/.MainActivityOption 1: Using Xcode
- Open the
/iosAppdirectory in Xcode - Select your target device or simulator
- Click the "Run" button (or press
Cmd + R)
Option 2: Build Kotlin Framework
# For iOS Simulator (ARM64)
./gradlew :composeApp:linkDebugFrameworkIosSimulatorArm64
# For iOS Device (ARM64)
./gradlew :composeApp:linkDebugFrameworkIosArm64# Run all common tests
./gradlew :composeApp:cleanTestDebugUnitTest :composeApp:testDebugUnitTest
# Run with coverage
./gradlew :composeApp:testDebugUnitTest --tests "*"SpainDecides/
βββ composeApp/ # Multiplatform module
β βββ src/
β βββ commonMain/ # Shared code (Android + iOS)
β β βββ kotlin/com/apptolast/spaindecides/
β β β βββ presentation/ # UI Layer (MVVM)
β β β β βββ ui/
β β β β β βββ screens/ # Composable screens
β β β β β βββ components/ # Reusable UI components
β β β β β βββ theme/ # Material 3 theming
β β β β βββ viewmodel/ # ViewModels
β β β βββ domain/ # Domain Layer
β β β β βββ repository/ # Repository interfaces
β β β βββ data/ # Data Layer
β β β β βββ model/ # Data models
β β β β βββ remote/ # Ktor API services
β β β β βββ repository/ # Repository implementations
β β β βββ di/ # Dependency Injection (Koin)
β β βββ composeResources/ # Shared resources
β βββ androidMain/ # Android-specific code
β β βββ kotlin/
β β βββ MainActivity.kt
β βββ iosMain/ # iOS-specific code (Kotlin)
β β βββ kotlin/
β β βββ MainViewController.kt
β βββ commonTest/ # Shared tests
βββ iosApp/ # iOS application entry point
β βββ iosApp/
β βββ iOSApp.swift
βββ gradle/ # Gradle configuration
β βββ libs.versions.toml # Version catalog
βββ build.gradle.kts # Root build script
Contributions are welcome! If you'd like to contribute to SpainDecides:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please ensure your code follows the existing code style and includes appropriate tests.
AppToLast
- GitHub: @apptolast
- Website: apptolast.com
- Built with Kotlin Multiplatform
- UI powered by Compose Multiplatform
- Backend by Supabase
- Icons from Material Design Icons
- CLAUDE.md - Comprehensive development guidelines and architecture documentation
- Kotlin Multiplatform Documentation
- Compose Multiplatform Documentation
- Ktor Client Documentation
- Koin Documentation
Made with β€οΈ for democratic participation
β If you find this project useful, please consider giving it a star!