A youth mental health and wellness platform for ages 13-25, providing daily check-ins, local program discovery, and crisis support resources. Room XI Connect helps young people feel seen, build capacity, and find community.
- Daily Check-ins: Track your mood and emotions with the cosmic "Mood Orb"
- Program Discovery: Browse free and low-cost programs in Edmonton (no login required)
- Crisis Support: Quick access to mental health resources and helplines
- Personal Dashboard: View your check-in history, streaks, and program attendance
- Save Programs: Bookmark programs you're interested in
- QR Code Check-in: Easy attendance tracking at in-person programs
- Offline Support: Core features work offline with automatic sync
- PIPA & HIA Compliant: Alberta privacy legislation compliance for youth data
- Granular Consent: Separate consent for health data, photos, and program participation
- Data Sovereignty: Optional Indigenous self-identification with OCAP principles
- Breach Notification: 72-hour OIPC notification system (Alberta requirement)
- Non-Identifying XID: Privacy-first identifiers for program attendance
- Cosmic Garden Design System: Calm, tranquil aesthetic with cosmic elements
- Trauma-Informed UX: Safe, non-judgmental interface design
- Progressive Web App: Install on any device, works like a native app
- Accessibility First: WCAG 2.1 AA compliant
Room XI Connect includes Capacitor for iOS and Android builds.
/ios and /android folders are not committed to version control and must be generated.
See MOBILE_BUILD.md for complete mobile build instructions.
# One-command setup (recommended)
npm run setup:mobile
# Or manually:
npx cap add ios && npx cap add android
npm run build:mobile && npm run cap:syncNote: iOS builds require macOS. Android builds work on all platforms.
- Node.js 20+ (installed via Replit)
- PostgreSQL database (Replit Neon instance)
- Clone the repository
git clone <your-repo-url>
cd room-xi-connect- Install dependencies
npm install- Set up environment variables
Create a .env file or use Replit Secrets:
# Database (auto-configured on Replit)
DATABASE_URL=postgresql://...
# Session secret (auto-generated if not set)
SESSION_SECRET=your-secret-key-here
# Optional: Custom map tiles
VITE_MAP_TILES_URL=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
VITE_MAP_ATTRIBUTION=© OpenStreetMap contributors
# Feature flags (optional)
VITE_ENABLE_PWA=true
VITE_ENABLE_OFFLINE=true- Initialize the database
npm run db:push- Seed the database (optional, adds sample programs)
npm run db:seed- Start the development server
npm run devThe app will be available at http://localhost:5000
For development/testing:
- Email:
test@example.com - Password:
test123
- React 18 - UI framework
- TypeScript - Type safety
- Vite 5 - Build tool and dev server
- React Router v6 - Client-side routing
- Tailwind CSS - Styling
- Framer Motion - Animations
- Leaflet - Interactive maps
- Recharts - Data visualization
- Express.js - HTTP server
- Drizzle ORM - Type-safe database queries
- PostgreSQL (Neon) - Database
- Express Session - Session-based authentication
- bcrypt - Password hashing
- connect-pg-simple - PostgreSQL session store
- vite-plugin-pwa - Progressive Web App support
- IndexedDB (idb) - Client-side storage
- Service Worker - Offline caching
room-xi-connect/
βββ server/ # Backend Express server
β βββ index.js # Main server entry point
β βββ schema.ts # Drizzle database schema
β βββ seed.ts # Database seeding script
β βββ routes/ # API route handlers
β βββ auth.js # Authentication endpoints
β βββ profile.js # User profile management
β βββ checkins.js # Daily check-in endpoints
β βββ programs.js # Program discovery
β βββ xid.js # Privacy-preserving IDs
β βββ crisis.js # Crisis resources
βββ src/ # Frontend React app
β βββ lib/ # Utilities and helpers
β β βββ api.ts # API client
β β βββ session.tsx # Session management
β β βββ queue.ts # Offline sync queue
β βββ routes/ # Page components
β β βββ Home.tsx # Dashboard with check-ins
β β βββ Me.tsx # User profile
β β βββ Settings.tsx # User settings
β β βββ Explore.tsx # Program browser
β β βββ Journal.tsx # Check-in history
β β βββ auth/ # Auth pages
β βββ ui/ # Reusable UI components
β β βββ home/ # Home page components
β β βββ explore/ # Program discovery UI
β β βββ crisis/ # Crisis support sheet
β β βββ me/ # Profile components
β βββ shell/ # App shell (nav, layout)
βββ public/ # Static assets
βββ package.json # Dependencies
βββ vite.config.ts # Vite configuration
Room XI Connect uses secure session-based authentication:
- Sessions stored in PostgreSQL with
connect-pg-simple - httpOnly cookies prevent XSS attacks
- SameSite cookies for CSRF protection
- Secure cookies in production (HTTPS only)
- 7-day session expiration with sliding window
- bcrypt hashing with salt rounds = 10
- Minimum 6-character password requirement
- Account deletion with password confirmation
- Non-identifying XIDs for program attendance
- Granular consent management (5 separate photo/media consents)
- Health data separated with HIA-compliant consent tracking
- Audit trails for all consent changes
- Breach notification system
POST /api/auth/register - Create new account
POST /api/auth/login - Sign in
POST /api/auth/logout - Sign out
POST /api/auth/reset-password - Request password reset
POST /api/auth/update-password- Update password
DELETE /api/auth/delete-account - Delete account
GET /api/auth/session - Check session status
GET /api/profile - Get user profile
PUT /api/profile - Update profile
POST /api/checkins - Create check-in
GET /api/checkins - List user's check-ins
GET /api/programs - List all programs
GET /api/programs/:id - Get program details
GET /api/programs/saved - List saved programs
POST /api/programs/saved - Save a program
DELETE /api/programs/saved/:id - Unsave a program
GET /api/xid - Get user's XID
GET /api/xid/attendance - Get attendance history
GET /api/crisis - Get crisis resources
- users - Authentication and credentials
- profiles - User profile data, streaks, XP
- consents - Granular consent tracking
- consent_events - Audit trail for consent changes
- health_profiles - HIA-compliant health data storage
- guardian_verifications - Guardian approval tracking
- programs - Program/activity catalog
- saved_programs - User bookmarks
- attendance - QR check-in records
- checkins - Daily mood tracking
- journal_entries - Extended journal entries
- breach_events - Privacy breach tracking
- session - Express session storage
See server/schema.ts for complete schema definitions.
- Cream (#F8F6F0) - Primary background
- Deep Sage (#2D3748) - Primary text
- Teal (#2EC489) - Primary accent
- Gold (#D4AF37) - Brand accent
- Sage (#9CAF88) - Secondary
- Coral (#FF6B6B) - Alerts/warnings
- Navy (#1A365D) - Dark elements
- Display: Playfair Display (headings)
- Body: Inter (body text)
- Monospace: System monospace (code)
The central feature - a breathing, interactive orb that visualizes mood state:
- Color-coded mood representation
- Accessibility patterns for color-blind users
- Trauma-informed design (no red/alarm colors)
- Smooth animations with reduced-motion support
Robust offline functionality with encrypted local storage:
- Automatic sync when connection restored
- Visual indicators for pending sync
- Encrypted sensitive data storage
- Retry logic with exponential backoff
# Run tests
npm test
# Run tests with UI
npm run test:ui- Configure deployment
# Already configured in .replit
deployment_target = "autoscale"- Build the app
npm run build- Deploy Click the "Deploy" button in Replit or use the CLI
Ensure these are set in Replit Secrets:
DATABASE_URL- Production database connectionSESSION_SECRET- Secret key for session encryption- All
VITE_*variables for runtime configuration
When schema changes:
# Push schema changes to database
npm run db:push
# Force push if there are conflicts
npm run db:push --forceThe seed script (npm run db:seed) creates:
- 1 test user (test@example.com / test123)
- 10 sample programs across Edmonton
- Crisis support resources (phone, chat, text lines)
DATABASE_URL- PostgreSQL connection stringSESSION_SECRET- Session encryption key (auto-generated if not set)
VITE_MAP_TILES_URL- Custom map tile serverVITE_MAP_ATTRIBUTION- Map attribution textVITE_ENABLE_PWA- Enable PWA features (default: true)VITE_ENABLE_OFFLINE- Enable offline mode (default: true)
- Create a feature branch
- Make your changes
- Test thoroughly (auth, programs, check-ins)
- Submit a pull request
- TypeScript for type safety
- Tailwind CSS for styling
- camelCase for API responses
- snake_case for database columns
- Safety First: All features reviewed for emotional safety
- Inclusive Design: Accessible to users with diverse needs
- Crisis Protocols: Robust crisis detection and response
- User Agency: Users maintain control over their experience
- ARCHITECTURE.md: Complete component and data flow documentation
- replit.md: Project summary and preferences
Room XI Connect includes comprehensive crisis support features:
- Crisis Hotlines: Direct links to crisis support services
- Text Support: SMS-based crisis support options
- Local Resources: Location-based support services
- Emergency Contacts: Quick access to emergency services
Copyright Β© 2025 Room 11 Foundation. All rights reserved.
Partners & Supporters:
- CanManDan
- JumpStart
- Allendale Community League
- Duggan Community League
- YMCA of Northern Alberta
- OTB Basketball
Technology:
- OpenStreetMap for map tiles
- Replit for hosting infrastructure
- Neon for PostgreSQL database
- Crisis support available 24/7 within the app
- Email: support@room11foundation.org
- Documentation: See
ARCHITECTURE.mdfor detailed component/data flow docs - Issues: Submit via GitHub issues
- Contact: tech@room11foundation.org
Built with β€οΈ for youth mental health and wellness