Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

169 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kombuciao πŸƒ

License: Polyform Noncommercial
Node.js Next.js React TypeScript MongoDB Tailwind CSS

A source-available full-stack platform to locate stores selling Ciao Kombucha near you.

February 2026 Update: The backend has been consolidated into the Next.js frontend application for improved performance, simpler deployment, and better developer experience. The backend/ folder now only contains Python data management scripts.

πŸƒ About

Kombuciao is a complete full-stack web application that helps you quickly find where to buy Ciao Kombucha. The application uses geolocation to show you nearby stores with available flavors, powered by an active community of Squeezos.

✨ Features

  • πŸ—ΊοΈ Interactive map with geolocation
  • πŸ” Address or city search
  • πŸͺ Filtering by available flavors
  • πŸ“± Responsive interface for mobile and desktop
  • ⚑ Real-time data on availability
  • πŸ‘₯ Community reporting system
  • πŸ—³οΈ Voting on reports to maintain reliability
  • 🌍 Geospatial data with MongoDB
  • πŸ“Š Automatic import of BANCO data

πŸ—οΈ Architecture

Kombuciao is a modern full-stack Next.js application with integrated backend functionality:

Frontend + Backend (/frontend)

  • Next.js 15 with App Router - Full-stack framework
  • React 19 and TypeScript - UI and type safety
  • Next.js API Routes - RESTful API endpoints
  • MongoDB + Mongoose - Database and ODM
  • Tailwind CSS - Modern styling
  • Leaflet - Interactive maps
  • shadcn/ui - Beautiful components

Data Management (/backend)

  • Python scripts for importing BANCO data
  • pymongo - Direct MongoDB access for bulk operations
  • Github Actions workflow for automated store data updates

πŸ“Š Data Sources

Stores

Store information comes from the Base Nationale des Commerces Ouverte (BANCO), a French public database. I cannot modify this data directly.

Flavor Availability

Information about flavor availability is based on community reports. Each user can:

  • Report flavor availability at a store
  • Vote on existing reports
  • Contribute to maintaining reliable information

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.7+
  • MongoDB (local or Atlas)
  • npm, yarn, pnpm or bun

Installation

  1. Clone the repository:
git clone https://github.com/atinyshrimp/kombuciao.git
cd kombuciao
  1. Set up the frontend (includes API):
cd frontend
npm install
  1. Configure environment variables:

Create frontend/.env:

MONGODB_URI="your_mongodb_connection_string"
API_KEY="your_secure_api_key"
  1. Set up Python for data import:
cd ../backend
python -m venv venv
venv\Scripts\activate  # Windows
# or: source venv/bin/activate  # macOS/Linux
pip install -r requirements.txt

Create backend/.env:

MONGODB_URI="your_mongodb_connection_string"
  1. Import store data:
python scripts/banco_to_mongo.py
  1. Start the development server:
cd ../frontend
npm run dev
  1. Open your browser:

πŸ› οΈ Technologies Used

Full-Stack Application (Frontend)

  • Framework: Next.js 15 with App Router
  • Runtime: React 19
  • Language: TypeScript 5
  • Styling: Tailwind CSS 4
  • Database: MongoDB with Mongoose ODM
  • Maps: Leaflet + React Leaflet
  • UI Components: shadcn/ui (Radix UI)
  • Icons: Lucide React
  • Notifications: Sonner
  • State Management: React Context

Data Import Scripts (Backend)

  • Language: Python 3.7+
  • Data Processing: pandas
  • Database: pymongo
  • HTTP: requests
  • Progress: tqdm

πŸ“ Project Structure

kombuciao/
β”œβ”€β”€ frontend/                     # Next.js full-stack application
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/                 # API routes (backend endpoints)
β”‚   β”‚   β”‚   β”œβ”€β”€ stores/         # Store CRUD operations
β”‚   β”‚   β”‚   └── reports/        # Report & voting system
β”‚   β”‚   β”œβ”€β”€ page.tsx            # Main page
β”‚   β”‚   └── layout.tsx          # Root layout
β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ cards/              # Store cards
β”‚   β”‚   β”œβ”€β”€ features/           # Feature components
β”‚   β”‚   β”œβ”€β”€ map/                # Map components
β”‚   β”‚   └── ui/                 # UI components (shadcn)
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ server/             # Server-side code
β”‚   β”‚   β”‚   β”œβ”€β”€ config/        # DB connection
β”‚   β”‚   β”‚   β”œβ”€β”€ models/        # MongoDB schemas
β”‚   β”‚   β”‚   β”œβ”€β”€ controllers/   # Business logic
β”‚   β”‚   β”‚   └── middleware/    # Auth & validation
β”‚   β”‚   └── utils.ts           # Client utilities
β”‚   └── types/                  # TypeScript types
β”œβ”€β”€ backend/                     # Data management scripts
β”‚   β”œβ”€β”€ scripts/
β”‚   β”‚   β”œβ”€β”€ banco_to_mongo.py   # Import BANCO data
β”‚   β”‚   └── update_types.py     # Update store types
β”‚   └── requirements.txt        # Python dependencies
└── README.md                   # This file

πŸ”Œ API Endpoints

All API endpoints are now integrated into Next.js at /api/*:

Stores

  • GET /api/stores - List stores with geospatial filters
    Query parameters:
    • lat, lng: Geographic coordinates for proximity search
    • radius: Search radius in meters (default: 5000)
    • name: Filter by store name (case-insensitive)
    • flavor: Filter by available flavors (can use multiple)
    • onlyAvailable: Show only stores with recent reports (boolean)
    • page, pageSize: Pagination parameters
  • GET /api/stores/stats - Get store statistics
  • GET /api/stores/:id - Get store details
  • POST /api/stores - Create a store (requires API key)
  • PUT /api/stores/:id - Update a store (requires API key)
  • DELETE /api/stores/:id - Delete a store (requires API key)

Reports

  • GET /api/reports - List availability reports
    Query parameters:
    • storeId:
    • since:
    • page, pageSize: Pagination parameters
  • GET /api/reports/:id - Get specific report
  • POST /api/reports - Create a report (requires API key)
  • POST /api/reports/:id/vote - Vote on report (requires API key)
  • DELETE /api/reports/:id/vote/:voteId - Delete vote (requires API key)
  • DELETE /api/reports/:id - Delete a report (requires API key)

πŸ”’ API Security

Protected endpoints (POST, DELETE) require an x-api-key header. The API key is stored securely server-side and never exposed to the browser.
This applies only for external requests.

πŸ—„οΈ Database

MongoDB Collections

Stores

{
  name: String,
  address: { street, postcode, city },
  location: { type: "Point", coordinates: [lng, lat] },
  openingHours: String,
  types: [String],
  createdAt: Date,
  updatedAt: Date
}

Reports

{
  store: ObjectId,
  flavors: [String],
  description: String,
  votes: [{
    voterId: String,
    type: "confirm" | "deny",
    createdAt: Date
  }],
  createdAt: Date,
  updatedAt: Date
}

πŸš€ Deployment

Vercel (Recommended)

  1. Deploy the frontend directory (contains everything)
  2. Set environment variables in Vercel dashboard:
    MONGODB_URI=your_mongodb_connection_string
    API_KEY=your_secure_api_key
    
  3. That's it! The API is bundled with the frontend.

Manual Deployment

cd frontend
npm run build
npm start

The application serves both the frontend and API from a single process.

🀝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Community Engagement

Kombuciao's relevance depends on community engagement. You can contribute by:

  • Reporting flavor availability at stores
  • Voting on existing reports
  • Reporting bugs or suggesting improvements
  • Contributing to the source code

πŸ“„ License

This project is distributed under the Polyform Noncommercial 1.0.0 license.

Permitted Use (Non-commercial):

  • βœ… Personal and educational use
  • βœ… Open source development contributions
  • βœ… Non-commercial research and development
  • βœ… Use by non-profit organizations

Prohibited Use (Commercial):

  • ❌ Use in a commercial context
  • ❌ Integration into paid products or services
  • ❌ Use by for-profit companies
  • ❌ Direct or indirect monetization

See LICENSE for more information.

πŸ“ž Contact

πŸ™ Acknowledgments

  • BANCO for store data
  • Ciao Kombucha for inspiration
  • The Squeezos community for contributions

Made with ❀️ for the Squeezos

About

πŸ§ƒ Trouvez oΓΉ acheter du Ciao Kombucha prΓ¨s de chez vous. Carte interactive avec disponibilitΓ© en temps rΓ©el.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages