2nd Brain

README

/home/darth/Documents/Mardowns/10_Projekte/MultiApps/apps/MadeIn/Projekt/README.md

MadeIn - Local Business Directory

A multilingual platform for discovering and promoting local businesses, built with SvelteKit and MongoDB.

Features

  • Multilingual support (27+ languages)
  • Business/provider listings with search and filtering
  • User reviews and ratings
  • Ad-free experience with donations
  • Admin dashboard for content management

Tech Stack

  • Frontend: SvelteKit, Tailwind CSS
  • Backend: Node.js, MongoDB
  • Authentication: JWT
  • Deployment: Vercel/Netlify (Frontend), MongoDB Atlas (Database)

Prerequisites

  • Node.js 16+ and npm 8+
  • MongoDB 6.0+ (local or Atlas)
  • Git

Getting Started

  1. Clone the repository

    git clone <repository-url>
    cd madein
    
  2. Install dependencies

    npm install
    
  3. Set up environment variables Copy .env.example to .env and update the values:

    cp .env.example .env
    

    Update the .env file with your configuration:

    # MongoDB
    MONGODB_URI=mongodb://localhost:27017
    MONGODB_DB=madein
    
    # Authentication
    JWT_SECRET=your_jwt_secret
    SESSION_SECRET=your_session_secret
    
    # Email (optional, for password reset)
    SMTP_HOST=smtp.example.com
    SMTP_PORT=587
    SMTP_USER=user@example.com
    SMTP_PASS=yourpassword
    
    # Payments (optional)
    STRIPE_SECRET_KEY=your_stripe_secret_key
    STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
    
  4. Set up MongoDB

  5. Initialize the database

    npm run db:init
    

    This will:

    • Create the database
    • Set up collections and indexes
    • Load initial data (if any)
  6. Start the development server

    npm run dev
    

    The app will be available at http://localhost:5173

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run check - Run TypeScript and Svelte checks
  • npm run format - Format code with Prettier
  • npm run lint - Lint code
  • npm run db:init - Initialize database with default data
  • npm run db:reset - Reset database (CAUTION: deletes all data)
  • npm run db:seed - Seed database with sample data

Project Structure

src/
├── lib/
│   ├── db/               # Database models and connection
│   ├── stores/           # Svelte stores
│   └── utils/            # Utility functions
├── routes/               # Application routes
└── app.html              # Main HTML template

Database Models

  • User: User accounts and authentication
  • Provider: Business listings
  • Review: User reviews and ratings
  • Donation: Donation records for ad-free experience
  • Translation: Multilingual content

Environment Variables

See .env.example for all available environment variables.

Deployment

Frontend

Deploy to Vercel or Netlify:

Deploy with Vercel

Deploy to Netlify

Backend

  1. Set up a MongoDB Atlas cluster: https://www.mongodb.com/cloud/atlas/register
  2. Update your .env with the Atlas connection string
  3. Deploy your API (if any) to a platform like Vercel, Netlify, or Railway

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE file for details.

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Attachments
Noch keine.