A Next.js webapp that profiles companies by alignment with user-selected causes and provides sources, scores, and alternatives.
- Personalized Scoring: Companies are scored based on your weighted preferences for different causes
- Comprehensive Data: Each company fact includes confidence levels and source citations
- AI Summaries: Get AI-generated summaries tailored to your values (signed-in users) or general ethicality (guests)
- Better Alternatives: Discover companies with better ethical alignment in the same category
- Guest Mode: Use the app without signing up, with default scoring weights
- Frontend: Next.js 15 (App Router) + TypeScript + Tailwind CSS
- Backend: Supabase (Postgres + Auth)
- ORM: Prisma
- AI: Google Gemini for text generation
- Hosting: Vercel
Create a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/ethicalbrand"
# Supabase
NEXT_PUBLIC_SUPABASE_URL="your-supabase-project-url"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-supabase-anon-key"
# Google Gemini AI
GEMINI_API_KEY="your-gemini-api-key"-
Set up Supabase:
- Create a new Supabase project
- Get your project URL and anon key from the API settings
- Copy the database connection string from Settings > Database
-
Run Prisma migrations:
npm run db:migrate
-
Seed the database:
npm run db:seed
- Go to Google AI Studio
- Create a new API key
- Add it to your
.env.localfile
# Install dependencies
npm install
# Start development server
npm run devVisit http://localhost:3000 to see the app.
- Search for companies and see results based on overall ethicality
- View company details, per-cause breakdowns, and AI summaries
- No account required
- Set personalized preference weights for different causes
- Get customized company scores based on your values
- AI summaries highlight alignment with your top priorities
- Save and manage your preferences
- Free Palestine: Support for Palestinian rights and opposition to Israeli occupation
- Russia Ukraine: Position on Russia-Ukraine conflict and support for Ukraine
- Feminism/Workplace: Gender equality, women's rights, and workplace diversity
- Child Labour: Opposition to child labor and support for children's rights
- LGBTQ+: Support for LGBTQ+ rights and equality
- Animal Cruelty: Opposition to animal cruelty and support for animal welfare
- Environment: Environmental sustainability and climate action
- Ethical Sourcing: Ethical supply chain and fair trade practices
- Data Privacy: Protection of user data and privacy rights
Companies receive scores from -1 (conflicts with values) to +1 (aligned with values):
- Aligned (0.3+): Company generally supports your values
- Mixed (-0.3 to 0.3): Company has mixed record on your values
- Conflicts (-0.3-): Company generally opposes your values
All company data comes from verified sources including:
- Company sustainability reports
- News articles and investigations
- Third-party assessments
- NGO reports
Each fact includes confidence levels and source citations.
GET /api/health- Health checkGET /api/companies/search- Search companiesGET /api/companies/[id]- Get company detailsGET/POST /api/prefs- User preferencesPOST /api/ai/summary- Generate AI summary
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy
Make sure to set all environment variables in your hosting platform:
DATABASE_URLNEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYGEMINI_API_KEY
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue on GitHub or contact the development team.