Skip to content

civicspark/Civicspark-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

CivicSpark

CivicSpark is a comprehensive civic engagement application built with React Native and Expo, designed to help users stay informed about elections, voting locations, and civic education. The app combines location-based services, real-time election data, and educational content to promote active civic participation.

🌟 Features

πŸ—ΊοΈ Voting Location Finder

  • Interactive map showing nearby polling stations and voting locations
  • Uses OpenStreetMap and Overpass API to locate voting facilities
  • Get directions to voting locations with one tap
  • Search functionality for specific voting locations

πŸ“… Elections Calendar

  • Personalized election calendar based on your location
  • Integration with Google Civic Information API
  • Different election types (federal, state, local)
  • Save election reminders for important dates
  • Visual calendar interface with election indicators

πŸŽ“ Civic Education Academy

  • Comprehensive course library covering civic topics
  • Interactive learning modules with quizzes
  • Progress tracking and achievement system
  • Certificate generation upon completion
  • Sequential course unlocking system
  • Final examination for certification
  • Individual course quizzes to test knowledge
  • Educational modules with interactive questions
  • Certificate sharing functionality

πŸ“° News & Updates

  • Curated news feed focused on civic topics
  • RSS integration from trusted political sources
  • Real-time updates on election news and voting information

πŸŽ“ Achievement Certificate

  • Professional certificate generation upon course completion
  • Shareable digital certificates
  • Personalized achievement recognition
  • Certificate download and sharing capabilities

πŸ‘€ User Profile

  • Personalized user experience
  • Name, avatar, and age preferences
  • Dark mode support
  • First-launch onboarding flow

πŸ—³οΈ My Vote

  • Secure storage for voting preferences
  • Personalized voting tools (not implemented yet)
  • Civic engagement tracking
  • Ballot information retrieval
  • PDF generation for voting materials
  • Civic issue prioritization tools

πŸ› οΈ Technical Stack

Frontend

  • React Native - Cross-platform mobile development
  • Expo - Simplified React Native development workflow
  • Expo Router - File-based navigation system
  • React Navigation - Screen navigation
  • React Native Maps/Webview - Interactive map functionality
  • AsyncStorage - Local data persistence
  • Expo Location - Location services
  • Framer Motion - Smooth animations

Backend

  • Node.js/Express - Server-side proxy API
  • Google Civic Information API - Official election data
  • OpenStreetMap/Overpass API - Location and map data
  • RSS-to-JSON service - News aggregation

UI Components

  • Linear Gradients - Modern aesthetic design
  • Bottom Navigation - Intuitive app navigation
  • Material Design - Consistent UI elements
  • Responsive Layout - Works across devices

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Expo CLI (or use Expo Go app on your mobile device)
  • A Google Civic Information API key

Installation

  1. Clone the repository:
git clone <repository-url>
cd civicspark
  1. Install frontend dependencies:
npm install
  1. Navigate to the backend directory and install dependencies:
cd backend
npm install
  1. Set up environment variables:
# In the backend directory, create .env file:
CIVIC_API_KEY=your_google_civic_api_key_here
PORT=3000
  1. Start the backend server:
cd backend
npm run dev
  1. In a new terminal, start the Expo app:
# From the root directory
npm start
  1. Scan the QR code with the Expo Go app on your phone or run on an emulator.

Environment Variables

The app requires the following environment variables:

Frontend (in project root):

EXPO_PUBLIC_API_LINK=http://localhost:3000 (or your deployed backend URL)

Backend (in backend directory):

CIVIC_API_KEY=your_google_civic_api_key
PORT=3000

πŸ“ Project Structure

civicspark/
β”œβ”€β”€ app/                    # Expo Router app structure
β”‚   β”œβ”€β”€ (tabs)/            # Main tab screens
β”‚   β”‚   β”œβ”€β”€ _layout.tsx    # Tab navigation layout
β”‚   β”‚   β”œβ”€β”€ calendar.tsx   # Elections calendar
β”‚   β”‚   β”œβ”€β”€ certificate.tsx # Achievement certificate
β”‚   β”‚   β”œβ”€β”€ home.tsx       # Home dashboard
β”‚   β”‚   β”œβ”€β”€ map.tsx        # Voting location map
β”‚   β”‚   β”œβ”€β”€ myvote.tsx     # Voting preferences
β”‚   β”‚   β”œβ”€β”€ settings.tsx   # User settings
β”‚   β”‚   └── ethics/        # Civic education courses
β”‚   β”‚       β”œβ”€β”€ index.tsx  # Ethics course listing
β”‚   β”‚       β”œβ”€β”€ [id].tsx   # Individual course detail
β”‚   β”‚       β”œβ”€β”€ certificate.tsx # Ethics certificate
β”‚   β”‚       β”œβ”€β”€ final-quiz.tsx # Final examination
β”‚   β”‚       β”œβ”€β”€ course-quiz/[id].tsx # Course quizzes
β”‚   β”‚       └── module/[id].tsx # Learning modules
β”‚   β”œβ”€β”€ index.tsx          # Main app entry point
β”‚   └── welcome.tsx        # Onboarding flow
β”œβ”€β”€ backend/               # Node.js/Express API server
β”‚   β”œβ”€β”€ server.js          # Main server file
β”‚   └── package.json       # Backend dependencies
β”œβ”€β”€ assets/                # Images, fonts, and other assets
β”œβ”€β”€ components/            # Reusable UI components
β”œβ”€β”€ hooks/                 # Custom React hooks
└── lib/                   # Shared utilities and data

πŸ“± Screens & Navigation

  • Home Tab - Dashboard with quick access to all features
  • Map Tab - Interactive map for finding voting locations
  • Calendar Tab - Election dates and reminders
  • Ethics Tab - Civic education courses and learning
    • Ethics Index - Course listing and progress tracking
    • Course Detail - Individual course modules and progress
    • Module Detail - Interactive learning modules with questions
    • Course Quiz - Quizzes to test knowledge after each course
    • Final Quiz - Comprehensive examination for certification
    • Certificate - Achievement certificate upon completion
  • Certificate Tab - Achievement certificate display and sharing
  • My Vote Tab - Voting preferences and tools
  • Settings Tab - Account and app settings

πŸ”§ API Integration

Google Civic Information API

The backend serves as a proxy server for the Google Civic Information API to:

  • Retrieve voter information by address
  • Fetch upcoming elections
  • Get representative information
  • Handle rate limiting and security

OpenStreetMap Integration

  • Uses Overpass API for voting location data
  • Interactive map with custom markers
  • Location-based search functionality

🎨 Design Philosophy

CivicSpark follows a clean, modern design approach with:

  • Dark and light mode support
  • Intuitive navigation patterns
  • Accessible color schemes
  • Responsive layouts
  • Consistent typography
  • Meaningful iconography

🀝 Contributing

We welcome contributions to CivicSpark! To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes (git commit -m 'Add some AmazingFeature')
  6. Push to the branch (git push origin feature/AmazingFeature)
  7. Open a Pull Request

Development Guidelines

  • Follow React Native best practices
  • Maintain consistent UI/UX across the app
  • Write clean, well-documented code
  • Test on both iOS and Android
  • Handle error states gracefully

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support, please open an issue in the GitHub repository.

πŸ’‘ About CivicSpark

CivicSpark was created to address the critical need for accessible civic education and engagement tools. The app aims to make civic participation easier for all citizens by providing a comprehensive platform for election information, voting location services, and civic education.


Built with ❀️ for civic engagement

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors