frontend Svelte Themes

Frontend

Instafication is a smart notification service that monitors booking systems and instantly alerts you via SMS or email when new appointment slots become available.

πŸ“± Instafication - Smart Booking Notifications

Instafication is a smart notification service that monitors booking systems and instantly alerts you via SMS or email when new appointment slots become available. Never miss a booking opportunity again!

✨ Features

  • πŸ”” Real-time Notifications - Get instant SMS/email alerts when bookings become available
  • 🏠 Multi-Service Support - Monitor laundry, parking, rental bookings and more
  • 🌍 Internationalization - Available in multiple languages (Swedish, English)
  • πŸ’³ Flexible Pricing - Pay-per-use or monthly subscription options
  • πŸ“± Responsive Design - Works seamlessly on desktop and mobile
  • πŸ” Secure Authentication - Google OAuth and email/password login
  • ⚑ High-Performance Scraping - Efficient monitoring with configurable intervals
  • 🎯 Smart Filtering - Get notifications only for your preferred areas and timeframes

πŸš€ Quick Start

Prerequisites

  • Node.js 18.x or higher
  • PostgreSQL database
  • Supabase account (for authentication)
  • Stripe account (for payments)

Installation

  1. Clone the repository

    git clone https://github.com/instafication/frontend.git
    cd frontend
    
  2. Install dependencies

    bun install
    
  3. Set up environment variables Create a .env file in the root directory:

    DATABASE_URL=your_postgresql_connection_string
    DIRECT_URL=your_postgresql_direct_connection_string
    PUBLIC_SUPABASE_URL=your_supabase_project_url
    PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
    STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
    STRIPE_SECRET_KEY=your_stripe_secret_key
    STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
    
  4. Set up the database

    bunx prisma generate
    bunx prisma db push
    
  5. Configure Supabase triggers Run this SQL in your Supabase SQL editor:

    -- Create function to handle new user registration
    create function public.handle_new_user()
    returns trigger
    language plpgsql
    security definer set search_path = public
    as $$
    begin
      insert into public.profiles (id, email)
      values (new.id, new.email);
      return new;
    end;
    $$;
    
    -- Create trigger for new user registration
    create trigger on_auth_user_created
      after insert on auth.users
      for each row execute procedure public.handle_new_user();
    
  6. Start the development server

    bun run dev
    

Visit http://localhost:5173 to see the application running!

πŸ› οΈ Development

Available Scripts

  • bun run build - Build for production
  • bun run dev - Start development server
  • bun run deploy - Deploy project to Cloudflare

Project Structure

src/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ Components/          # Reusable Svelte components
β”‚   β”œβ”€β”€ Managers/           # Business logic managers
β”‚   β”œβ”€β”€ server/             # Server-side utilities
β”‚   β”œβ”€β”€ trpc/              # tRPC API routes
β”‚   β”œβ”€β”€ i18n.ts            # Internationalization
β”‚   └── translations.ts    # Translation strings
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ +layout.svelte     # Main layout
β”‚   β”œβ”€β”€ +page.svelte       # Landing page
β”‚   β”œβ”€β”€ [...api]/          # API routes
β”‚   β”œβ”€β”€ payment/           # Payment handling
β”‚   └── webhook/           # Webhook endpoints
└── app.html               # HTML template

Tech Stack

  • Frontend: SvelteKit with TypeScript
  • Styling: Tailwind CSS + Flowbite components
  • Database: PostgreSQL with Prisma ORM
  • Authentication: Supabase Auth
  • API: tRPC for type-safe APIs
  • Payments: Stripe integration
  • Deployment: Vercel, Cloudflare Workers support
  • Email: Sendinblue integration

πŸ“Š Database Schema

The application uses four main database tables:

  • profiles - User profiles and subscription data
  • services - User service subscriptions and preferences
  • scrapers - Monitoring configuration for different booking systems
  • notifications - Historical notification data

πŸ”§ Configuration

Service Configuration

Users can configure:

  • Notification method (SMS/Email)
  • Notification timing (1 hour, 1 day, 2 days in advance)
  • Service areas (e.g., specific housing areas)
  • Service types (laundry, parking, rentals)

Scraper Configuration

Administrators can configure:

  • Scraping frequency (minutes)
  • Target companies/services
  • Service parameters
  • Monitoring areas

πŸš€ Deployment

Cloudflare

  1. Install Wrangler: bun i -g wrangler
  2. Configure wrangler.toml
  3. Run: bun run deploy

πŸ’° Pricing Model

Instafication offers two pricing tiers:

  1. Pay-per-notification: 9 SEK for 2 notifications
  2. Monthly subscription: 19 SEK/month for unlimited notifications (30-day free trial)

🌐 Supported Services

Currently supports:

  • Stockholms StudentbostΓ€der (SSSB) - Laundry booking monitoring
  • More services coming soon!

🀝 Contributing

We welcome contributions! Please follow these steps:

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

Code Style

  • Use TypeScript for all new code
  • Follow the existing code formatting (Rome)
  • Add JSDoc comments for complex functions
  • Use semantic commit messages

πŸ“ API Documentation

tRPC Routes

The application uses tRPC for type-safe API communication. Key endpoints:

  • User management
  • Service configuration
  • Notification handling
  • Payment processing

Webhooks

  • Stripe payment webhooks
  • Notification delivery webhooks

πŸ” Security

  • All API routes are protected with authentication
  • Sensitive data is encrypted
  • CORS properly configured
  • Rate limiting on API endpoints

πŸ“„ License

This project is proprietary software. All rights reserved.

🚧 Roadmap

  • iOS/Android mobile apps
  • More booking service integrations
  • Advanced notification filtering
  • Calendar integration
  • Multi-user accounts for families

Made with ❀️ by the Instafication team

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes