Ethnica is a web application that helps users discover and support businesses that align with their values and demographics. The platform allows users to find businesses on a map, read reviews from people with similar backgrounds, and search for establishments based on their preferences.
- Interactive Map: Discover businesses near you using Mapbox integration
- Demographic Matching: See reviews from people with similar backgrounds and preferences first
- Value-Based Search: Find businesses that match your values and priorities
- User Profiles: Create a semi-anonymous profile with demographic information
- Reviews System: Leave and read authentic reviews from the community
- Frontend: Next.js 14, React, TypeScript, Tailwind CSS
- UI Components: shadcn/ui (built on Radix UI)
- Database: PostgreSQL with Prisma ORM
- Maps: Mapbox GL
- Authentication: NextAuth.js
- Form Handling: React Hook Form with Zod validation
- Styling: Tailwind CSS with dark mode support
- Node.js 18+ and npm
- PostgreSQL database
- Mapbox API key
-
Clone the repository:
git clone https://github.com/yourusername/ethnica.git cd ethnica -
Install dependencies:
npm install
-
Set up environment variables:
- Copy
.env.exampleto.env - Update the database connection string and Mapbox API key
- Copy
-
Set up the database:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser
To deploy the application to Vercel:
-
Push your code to a GitHub repository
-
Visit Vercel and sign up or log in
-
Click "Add New..." and select "Project"
-
Import your GitHub repository
-
Configure the project:
- Framework Preset: Next.js
- Root Directory: ./
- Build Command: next build
- Output Directory: .next
-
Set up environment variables in the Vercel dashboard:
NEXT_PUBLIC_MAPBOX_TOKEN: Your Mapbox API tokenNEXT_PUBLIC_PRIVY_APP_ID: Your Privy App IDDATABASE_URL: Your production database connection stringNEXTAUTH_SECRET: A secure random string for NextAuthNEXTAUTH_URL: Your deployed application URL
-
Click "Deploy" and wait for the build to complete
You can also use the Vercel CLI for more advanced deployment options:
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy to production
vercel --prod/app- Next.js app router pages and layouts/components- Reusable React components/lib- Utility functions and shared code/prisma- Database schema and migrations/public- Static assets
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please contact the team at team@ethni.ca.