Project Info
Inspiration
Civic engagement events — whether community cleanups, donation drives, or hackathons — often struggle with two problems: coordination chaos and privacy concerns. Volunteers and organizers juggle logistics, media collection, and real-time updates, while trying to ensure that no participant’s identity is exposed without consent. We wanted to build a platform that combines AI coordination, ethical privacy, and content generation — giving organizers a smart way to manage operations while protecting participants’ identities. That’s how ConsentfulCivicLens was born: a system that helps event organizers coordinate smoothly, automatically blur faces in photos and videos, and generate meaningful content summaries to share with their communities.
What it does
ConsentfulCivicLens is an AI-powered event coordination and media management platform designed for privacy-first civic engagement. Smart Event Coordination: Suggests next-step actions for organizers — from setup verification to volunteer deployment — using contextual event data and progress tracking. Smart Event Coordination: Suggests next-step actions for organizers — from setup verification to volunteer deployment — using contextual event data and progress tracking. Privacy-Preserving Media Uploads: Automatically detects and blurs faces in photos and videos to protect participants’ privacy, with customizable settings for consented individuals or minors. Privacy-Preserving Media Uploads: Automatically detects and blurs faces in photos and videos to protect participants’ privacy, with customizable settings for consented individuals or minors. AI-Driven Content Creation: Uses media uploads to auto-generate highlight reels, captions, and social posts, saving organizers hours of post-event work. AI-Driven Content Creation: Uses media uploads to auto-generate highlight reels, captions, and social posts, saving organizers hours of post-event work. Organizer Dashboard: Displays real-time updates, team tasks, and media uploads in a single interface — making event operations seamless and proactive. Organizer Dashboard: Displays real-time updates, team tasks, and media uploads in a single interface — making event operations seamless and proactive.
How we built it
Frontend: Built using Next.js and Tailwind CSS, creating a clean and responsive interface for event creation, task tracking, and uploads. Backend: Powered by Supabase (PostgreSQL, Auth, Storage) for secure file management, user authentication, and scalable data handling. Face Blurring Pipeline: Implemented in Python using MediaPipe and OpenCV, enabling automatic anonymization of faces in uploaded images and videos. Content Generation: Integrated ffmpeg for trimming and formatting media, and LLMs for auto-generating captions, summaries, and social post drafts. Recommendation Engine: Developed a hybrid rule-based logic that identifies pending tasks and suggests contextually relevant next actions to organizers.
Challenges we ran into
Balancing Privacy and Usability: Ensuring that the face blurring system was reliable but didn’t distort content quality. Balancing Privacy and Usability: Ensuring that the face blurring system was reliable but didn’t distort content quality. Real-Time Media Processing: Managing large file uploads while maintaining smooth front-end performance. Real-Time Media Processing: Managing large file uploads while maintaining smooth front-end performance. Time Constraints: Integrating computer vision, backend storage, and frontend UI within the hackathon timeline. Time Constraints: Integrating computer vision, backend storage, and frontend UI within the hackathon timeline. System Coordination: Making sure the recommendation logic and upload verification worked together seamlessly. System Coordination: Making sure the recommendation logic and upload verification worked together seamlessly.
Accomplishments we're proud of
Built a fully functional end-to-end media privacy pipeline that automatically blurs faces. Created an intelligent event dashboard for real-time updates and task suggestions. Designed an AI-powered content creation system that transforms raw uploads into shareable social posts. Implemented a foundation for a privacy-first civic engagement tool that can scale to larger events.
What we learned
How to integrate computer vision and LLMs into practical, socially impactful workflows. The importance of privacy and consent when dealing with civic or community-based data. How to manage full-stack systems that combine real-time updates, media processing, and AI decision-making. Effective team collaboration and agile problem-solving under time pressure.
What's next
Our current MVP showcases the potential of AI-assisted, privacy-respecting event management — but the full vision is much larger. We plan to expand ConsentfulCivicLens into a comprehensive civic engagement platform with the following next steps: 1. Full Consent Infrastructure Deploy QR-based consent badges allowing attendees to opt in/out of visibility. Build identity-linked consent databases for recurring volunteers and civic partners. 2. Smart Media Director Add multi-camera support with automatic highlight detection. Use speech-to-text and caption generation for accessible event storytelling. Enable AI video summarization that creates short, shareable reels instantly. 3. Predictive Coordination System Integrate event analytics to forecast bottlenecks like volunteer shortages or check-in queues. Provide predictive, context-aware “next best action” recommendations during live operations. 4. One-Click Publishing & Analytics Connect directly to social media for ethical content sharing with attribution and privacy tagging. Add post-event analytics dashboards tracking engagement, impact, and volunteer efficiency. 5. Civic Partnerships Collaborate with community organizations, universities, and municipalities to pilot ConsentfulCivicLens for real civic use cases — from public cleanups to cultural events.
Consentful Civic Lens (CCL)
An event-centric, photo/video forum for your campus and neighborhood. Capture moments with consent, create community stories, and take action together.
🌟 Features
Privacy-First Community Building
- Automatic Face Blurring: Non-consenting faces are automatically blurred using on-device face detection
- Per-Event Consent Tokens: Privacy tokens are event-specific and never stored permanently
- Consent Management: Users can opt-in per event with secure, salted face hashes
Visual Storytelling
- Community Highlights: Auto-generated 60-second recaps from event photos/videos
- Multi-Perspective Cuts: Community, Organizer, and Family-friendly versions
- Source Transparency: See which media contributed to each story
Action-Oriented Engagement
- Smart Recommendations: AI-powered action suggestions based on user profile and event context
- Action Cards: Volunteer shifts, donation requests, forms, and follow-up meetings
- Impact Tracking: Measure real community outcomes
Accessibility & Safety
- Auto Captions: Generated for all video content
- Alt Text: Automatic descriptions for images
- Safety Checks: Flicker, loudness, and content moderation
- Accessibility Scoring: Built-in metrics for inclusive content
🚀 Quick Start
Prerequisites
- Node.js 18+
- Supabase account
- Stripe account (for payments)
1. Clone and Install
git clone <your-repo-url>
cd ConsentfulCivicLens
npm install
2. Environment Setup
Create a .env.local file with your Supabase credentials:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Database
POSTGRES_URL=your_postgres_connection_string
# Authentication
AUTH_SECRET=your_auth_secret_key
# Stripe (optional)
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
3. Database Setup
Option A: Using Supabase (Recommended)
- Go to your Supabase dashboard
- Navigate to SQL Editor
- Run the migration script from
lib/db/migrations/0000_soft_the_anarchist.sql
Option B: Using Drizzle
npm run db:setup
npm run db:migrate
npm run db:seed
4. Supabase Configuration
Enable Authentication
- Go to Authentication > Settings in your Supabase dashboard
- Enable email authentication
- Configure email templates if desired
Set up Row Level Security (RLS)
Run these SQL commands in your Supabase SQL editor:
-- Enable RLS on all tables
ALTER TABLE users ENABLE ROW LEVEL SECURITY;
ALTER TABLE events ENABLE ROW LEVEL SECURITY;
ALTER TABLE assets ENABLE ROW LEVEL SECURITY;
ALTER TABLE consent_tokens ENABLE ROW LEVEL SECURITY;
ALTER TABLE actions ENABLE ROW LEVEL SECURITY;
ALTER TABLE action_participants ENABLE ROW LEVEL SECURITY;
-- Users can only see their own data
CREATE POLICY "Users can view own profile" ON users
FOR SELECT USING (auth.uid()::text = id::text);
CREATE POLICY "Users can update own profile" ON users
FOR UPDATE USING (auth.uid()::text = id::text);
-- Events are public to read, but only organizers can create/update
CREATE POLICY "Events are viewable by everyone" ON events
FOR SELECT USING (true);
CREATE POLICY "Only organizers can create events" ON events
FOR INSERT WITH CHECK (
EXISTS (
SELECT 1 FROM users
WHERE users.id = organizer_id
AND users.role = 'organizer'
AND auth.uid()::text = users.id::text
)
);
-- Assets are viewable by everyone, but only the uploader can create
CREATE POLICY "Assets are viewable by everyone" ON assets
FOR SELECT USING (true);
CREATE POLICY "Users can upload assets" ON assets
FOR INSERT WITH CHECK (auth.uid()::text = user_id::text);
-- Consent tokens are private to the user
CREATE POLICY "Users can manage own consent tokens" ON consent_tokens
FOR ALL USING (auth.uid()::text = user_id::text);
-- Actions are viewable by everyone
CREATE POLICY "Actions are viewable by everyone" ON actions
FOR SELECT USING (true);
-- Action participants can be managed by the user
CREATE POLICY "Users can manage own action participation" ON action_participants
FOR ALL USING (auth.uid()::text = user_id::text);
Set up Storage
- Go to Storage in your Supabase dashboard
- Create a new bucket called
media-assets - Set up the following policies:
-- Allow authenticated users to upload media
CREATE POLICY "Authenticated users can upload media" ON storage.objects
FOR INSERT WITH CHECK (bucket_id = 'media-assets' AND auth.role() = 'authenticated');
-- Allow everyone to view media
CREATE POLICY "Media is viewable by everyone" ON storage.objects
FOR SELECT USING (bucket_id = 'media-assets');
-- Users can update their own uploads
CREATE POLICY "Users can update own uploads" ON storage.objects
FOR UPDATE USING (bucket_id = 'media-assets' AND auth.uid()::text = (storage.foldername(name))[1]);
5. Run the Application
npm run dev
Visit http://localhost:3000 to see the application.
🏗️ Architecture
Frontend (Next.js 15)
- App Router: Modern Next.js routing with server components
- TypeScript: Full type safety throughout
- Tailwind CSS: Utility-first styling
- shadcn/ui: Accessible component library
Backend (Supabase)
- PostgreSQL: Primary database with Drizzle ORM
- Authentication: Supabase Auth with JWT tokens
- Storage: File uploads for media assets
- Real-time: Live updates for collaborative features
Privacy & Security
- On-Device Processing: Face detection runs in browser
- Consent Tokens: Event-scoped, salted face hashes
- RLS Policies: Database-level access control
- HTTPS Only: All communications encrypted
📱 User Flows
For Organizers
- Sign Up/Login → Choose "Organizer" role
- Create Event → Add details, actions, and generate QR code
- Manage Event → View participants, media, and analytics
- Export Packet → Download civic packet with metrics
For Attendees
- Scan QR Code → Join event with consent
- Capture Media → Take photos/videos with privacy protection
- View Highlights → See auto-generated community stories
- Take Action → Participate in recommended activities
🔧 Development
Database Migrations
# Generate new migration
npm run db:generate
# Apply migrations
npm run db:migrate
# Open Drizzle Studio
npm run db:studio
Adding New Features
- Update database schema in
lib/db/schema.ts - Generate and run migrations
- Update TypeScript types
- Implement frontend components
- Add API routes if needed
Testing
# Run type checking
npm run type-check
# Run linting
npm run lint
# Run build
npm run build
🚀 Deployment
Vercel (Recommended)
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push to main
Other Platforms
- Railway: Good for full-stack deployment
- Supabase: Hosts your database and auth
- Cloudflare: CDN and edge functions
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
MIT License - see LICENSE file for details
🆘 Support
- Documentation: Check this README and code comments
- Issues: Create GitHub issues for bugs or feature requests
- Discussions: Use GitHub Discussions for questions
🎯 Roadmap
- Mobile app (React Native)
- Advanced AI features (Claude integration)
- Real-time collaboration
- Advanced analytics dashboard
- Multi-language support
- Integration with calendar apps
- Social media sharing
- Offline support
Built with ❤️ for community building and privacy protection.
Analysis
View
Metric
- 10
- 10
- 2
- 2
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- SQLIn code
- SupabaseIn code
- Tailwind CSSIn code
- TypeScriptIn code
- FlaskClaimed
- Node.jsClaimed
- PostgreSQLClaimed
12 of 15 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
572 KB
Source files
130
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
shaaronl/ConsentfulCivicLens
150 files · 1.2 MB · @ 31e1df8
Structure
Interface
73 files · 49%Screens, components and styles rendered to the user.
+9 moreAPI & routing
10 files · 7%Request entry points: routes, handlers and controllers.
Application logic
22 files · 15%Domain rules, services and shared utilities.
Data & schema
9 files · 6%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript61%
- YAML26%
- JavaScript3%
- SQL3%
- Markdown2%
- Python2%
- Other (2)2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 39- @anthropic-ai/sdk
- @radix-ui/react-radio-group
- @radix-ui/react-tabs
- @supabase/ssr
- @supabase/supabase-js
- @tailwindcss/postcss
- autoprefixer
- bcryptjs
- class-variance-authority
- clsx
- dotenv
- drizzle-orm
- fluent-ffmpeg
- gtts
- jose
- livekit
- livekit-server-sdk
- lucide-react
- +21 more
python-face-service/requirements.txt
pypi · 8- fastapi
- insightface
- numpy
- opencv-python
- python-dotenv
- python-multipart
- supabase
- uvicorn
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.