A multi-tenancy platform that connects farmers and consumers in local communities for the direct purchase of organic products.
- Framework: Next.js 15+ (App Router)
- Language: TypeScript
- Database: PostgreSQL
- ORM: Prisma
- Authentication: NextAuth.js
- Styling: Tailwind CSS
- Validation: Zod
- Package Manager: pnpm
- PWA: Progressive Web App support
- 🌱 Progressive Web App: Installable on any device
- 🏘️ Communities: Local farmer-consumer communities
- 🌾 Listings: Direct product offers and demands
- 📅 Events: Community gatherings and markets
- 👥 Memberships: Community membership management
- 🔐 Authentication: Secure user authentication with roles
- 📱 Responsive: Mobile-first responsive design
ecomama/
├── app/ # Next.js App Router
├── components/ # Shared components
│ ├── ui/ # Base UI components
│ ├── layout/ # Layout components
│ └── common/ # Common components
├── features/ # Feature modules
│ ├── auth/
│ ├── communities/
│ ├── memberships/
│ ├── profiles/
│ ├── listings/
│ ├── events/
│ ├── landing/ # Landing page components
│ ├── pwa/ # PWA functionality
│ └── admin/
├── lib/ # Utilities and configurations
│ ├── prisma/ # Prisma client
│ ├── auth/ # NextAuth configuration
│ ├── validations/ # Zod schemas
│ └── utils/ # Utility functions
├── types/ # Global TypeScript types
├── public/ # Static assets
│ ├── icons/ # PWA icons
│ ├── manifest.json # PWA manifest
│ └── sw.js # Service Worker
└── prisma/ # Schema and migrations
- Node.js 20+
- pnpm (recommended) or npm
- PostgreSQL 14+
- Clone the repository:
git clone https://github.com/gmartincor/Ecomama.git
cd Ecomama- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .envEdit .env and configure your database URL and other variables.
- Set up the database:
# Generate Prisma Client
pnpm db:generate
# Run migrations
pnpm db:migrate
# Seed the database (optional)
pnpm db:seed- Run the development server:
pnpm devOpen http://localhost:3000 in your browser.
See DEPLOYMENT.md for detailed instructions on deploying to Vercel with Postgres database.
- Click the button above
- Add a Postgres database from the Storage tab
- Configure environment variables (AUTH_SECRET)
- Deploy!
The app is installable as a Progressive Web App:
- Visit the landing page
- Click "Instalar App" button in the navigation
- Confirm installation in your browser
- App will be added to your home screen
To regenerate PWA icons:
pnpm pwa:icons