A React Native Expo TypeScript app for connecting students in need of transportation with those who can help, featuring Nostr integration, location-based posts, and real-time messaging.
Pars en Cours (French for "Go To Class") is a decentralized student transportation assistance app that enables students to request help and allows anyone to offer assistance. The app features a Nostr protocol integration, privacy-preserving location sharing, real-time messaging, and full internationalization support.
- Multi-User Type Support - Students can both ask for help and offer assistance; non-students can only offer help
- Interactive Map Interface - Mapbox-powered map with real-time location services and privacy controls
- Comprehensive Onboarding - 3-step onboarding process with Nostr key generation/import
- Floating Action Button - Context-aware expandable button with different options based on user type
- Nostr Integration - Full decentralized identity and data management using Nostr protocol
- Real-time Messaging - NIP-04 encrypted direct messages with conversation management
- Location-Based Posts - Privacy-preserving geohash implementation for approximate location sharing
- Post Management - Create, view, and manage transportation requests and offers (NIP-99 classified listings)
- Internationalization - Complete English and French language support with automatic device detection
- Theme System - Light, dark, and auto theme modes with system preference detection
- TypeScript - Full type safety with comprehensive interfaces
- React Navigation - Bottom tabs and stack navigation
- Mapbox Integration - Professional mapping with custom styling
- Nostr Protocol - Decentralized identity and data management with custom RelayManager
- Location Services - GPS with privacy controls and geohash
- State Management - Context + useReducer for complex state
- Custom Hooks - Reusable logic for auth, location, Nostr, messaging, and listings
- Form Validation - Complete validation system
- AsyncStorage - Local data persistence with caching
- Real-time Subscriptions - Live updates for messages
src/
βββ components/
β βββ AppContent.tsx # Main app wrapper with status bar
β βββ common/ # Reusable UI components
β βββ Button.tsx # Multi-variant button with loading states
β βββ Input.tsx # Form input with validation
β βββ CustomAlert.tsx # Custom alert modal system
β βββ Dropdown.tsx # Dropdown selection component
β βββ FloatingActionButton.tsx # Context-aware expandable FAB
β βββ QRCodeModal.tsx # QR code display for Nostr keys
β βββ index.ts # Component exports
βββ screens/
β βββ OnboardingScreen.tsx # 3-step onboarding with Nostr setup
β βββ MapScreen.tsx # Mapbox-powered interactive map
β βββ MessagesScreen.tsx # Messages interface (placeholder)
β βββ ProfileScreen.tsx # User profile with QR code
β βββ ProfileEditScreen.tsx # Profile editing interface
β βββ SettingsScreen.tsx # App settings and preferences
βββ navigation/
β βββ RootNavigator.tsx # Root navigation with auth flow
β βββ MainStackNavigator.tsx # Main app stack navigation
β βββ BottomTabNavigator.tsx # Bottom tab navigation
βββ context/
β βββ AppContext.tsx # Global state with useReducer
β βββ ThemeContext.tsx # Theme management (light/dark/auto)
βββ hooks/
β βββ useAuth.ts # Authentication and user management
β βββ useLocation.ts # Location services and permissions
β βββ useNostrProfile.ts # Nostr profile management
β βββ useRelays.ts # Nostr relay management
β βββ useCustomAlert.ts # Custom alert system
β βββ useMessages.ts # NIP-04 direct messaging with real-time subscriptions
β βββ useListings.ts # NIP-99 classified listings management
β βββ useBookmarks.ts # Bookmark management
β βββ index.ts # Hook exports
βββ i18n/
β βββ index.ts # i18next configuration with device detection
β βββ hooks.ts # Translation hooks
β βββ locales/
β β βββ en.json # English translations
β β βββ fr.json # French translations
β βββ README.md # Localization documentation
βββ services/
β βββ RelayManager.ts # Centralized Nostr relay connection management
βββ types/
β βββ index.ts # Comprehensive TypeScript definitions
βββ utils/
βββ nostr.ts # Nostr key generation and validation
βββ nip04.ts # NIP-04 encryption/decryption for direct messages
βββ giftwrap.ts # NIP-59 gift wrap implementation (future)
βββ encryption.ts # Additional encryption utilities
βββ geohash.ts # Privacy-preserving location utilities
βββ validation.ts # Form validation helpers
βββ time.ts # Time formatting utilities
βββ deletion.ts # Post deletion utilities (NIP-09)
βββ dmRelays.ts # Direct message relay management
βββ index.ts # Utility exports
- React Native + Expo + TypeScript
- Mapbox + Nostr Protocol + i18next
- Node.js (v20.11.1 or higher)
- npm or yarn
- Expo CLI
- iOS Simulator or Android Emulator (or Expo Go app)
-
Clone the repository
git clone https://github.com/kn9w/pars_en_cours.git cd pars_en_cours -
Set up environment variables
cp env.example .env # Edit .env with your Mapbox tokens (get them from https://account.mapbox.com/access-tokens/) -
Install dependencies
npm install
-
Start the development server
npm start # or expo start -
Run on device/simulator
- iOS:
npm run iosor scan QR code with Camera app - Android:
npm run androidor scan QR code with Expo Go - Web:
npm run web
- iOS:
For faster development without Mapbox dependencies:
npm run start:no-mapbox3-step process for user type selection, feature introduction, and Nostr key generation/import with smooth animations.
Interactive Mapbox map with real-time location, color-coded markers for posts, geohash privacy, and tap-to-create functionality.
NIP-04 encrypted direct messaging with real-time updates, conversation threads, and automatic profile loading.
Form for creating "Ask" or "Give" posts with category selection, location services, configurable geohash precision, and image support.
Full post view with author profile, image carousel, action buttons (contact, bookmark, share), and delete option for post owners.
User's own Nostr profile with QR code sharing, settings access, and profile editing capabilities.
View other users' public profiles with bio, recent posts, and quick contact button.
Manage saved posts with pull-to-refresh and easy removal.
Relay management, theme selection (light/dark/auto), language switching, and account settings.
- FloatingActionButton - Context-aware expandable button (Ask/Give options)
- Button - Multi-variant button with loading states and icons
- CustomAlert - Themed modal system replacing native alerts
- QRCodeModal - Nostr key sharing with copy functionality
- PostCard - Listing display component with image support
- ProfileName - Reusable profile name display with caching
- SkeletonLoader - Loading state components
- Input - Form input with validation
- Dropdown - Dropdown selection component
- AppIcon - Custom app icon component
- useAuth - Authentication and user management
- useMessages - NIP-04 direct messaging with real-time subscriptions
- useListings - NIP-99 classified listings management
- useRelays - Nostr relay configuration management
- useLocation - Location services and permissions
- useNostrProfile - User's own Nostr profile management
- useUserProfile - Other users' profiles with smart caching
- useBookmarks - Bookmark management with AsyncStorage
- useCustomAlert - Custom alert system
- RelayManager - Centralized WebSocket connection management for Nostr relays with automatic reconnection
- Geohash Location: Truncated coordinates for approximate location sharing
- Optional Location: Users control when and how location is shared
- Nostr Decentralization: No central authority controls user data
- Key Management: Users control their own cryptographic keys
- NIP-04 Encryption: End-to-end encrypted direct messages
- No Data Collection: App doesn't collect personal data centrally
- Local Storage: Messages and profiles cached locally with AsyncStorage
- Nostr Integration: Complete Nostr protocol implementation with custom RelayManager
- User Authentication: Nostr key-based authentication system with AsyncStorage persistence
- Onboarding Flow: Comprehensive 3-step onboarding process with key generation/import
- Real-time Messaging: NIP-04 encrypted direct messages with live subscriptions
- Post Management: NIP-99 classified listings with create, view, delete, and filter functionality
- Theme System: Light, dark, and auto theme modes with system preference detection
- Internationalization: Complete English and French language support with i18next
- Location Services: GPS integration with privacy controls and geohash implementation
- Mapbox Integration: Professional mapping solution with custom markers and clustering
- Custom UI Components: Comprehensive component library with loading states
- Form Validation: Complete validation system for all user inputs
- State Management: Context-based state management with useReducer
- Profile Management: Nostr profile loading, caching, and display with QR codes
- Relay Management: Add, remove, and test Nostr relays with connection status
- Bookmark System: Save and manage favorite posts locally
We welcome contributions from the community! Here's how you can help make Pars en Cours better:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/kn9w/pars_en_cours.git cd pars_en_cours - Set up environment variables:
cp env.example .env # Edit .env with your Mapbox tokens - Install dependencies:
npm install
- Start development:
npm start
- Use the Issues tab to report bugs
- Search existing issues before creating new ones
- Include steps to reproduce, expected behavior, and screenshots if applicable
- Use issue templates when available
- Open a Feature Request issue
- Describe the feature and its use case
- Explain how it aligns with the project's goals
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes with clear, focused commits
- Test thoroughly on both Android and iOS if possible
- Update documentation if needed
- Submit a pull request with:
- Clear description of changes
- Screenshots/videos for UI changes
- Reference to related issues
Help make the app accessible worldwide! See our Translation Guide for details.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Connecting students in need of transportation with those who can help