# DigiStack — Meeting Planner Platform

A SaaS meeting scheduler (Google Calendar-style) with subscription plans, public marketing site, blog CMS, and AI-assisted meeting titles. Built by Saddam Husain. Reuses ~65% of the architecture from the sibling `report-neuronarc` project.

> **Full project spec:** `/var/www/html/projects/MEETING-PLANNER-SPEC.md` — read it for the complete feature list, schema, phases, and decisions. This file is the day-to-day working reference.

---

## Tech stack

- **Laravel 12** (PHP 8.2+) — pinned to `^12.0` to match `report-neuronarc`
- **Livewire 3.6** + **Volt** (functional API for auth pages & most components)
- **Laravel Breeze** (Livewire stack, dark mode) — auth scaffolding
- **Tailwind CSS 3** + `@tailwindcss/forms` + **Vite 7** (build works on Node 18 with a warning; upgrade Node to 20+ when convenient)
- **MySQL** — database `digistack` (root / `Pass@!123` locally, see `.env`)
- **Laravel Queue** — `database` driver (for reminders, recurring meetings, auto-renewal)
- **openai-php/laravel** — for AI meeting-title suggestions
- **Paysecure** — payment gateway (config + flow ported from report-neuronarc; keys are placeholders in `.env`)
- Calendar UI (later phases): **FullCalendar.js**

## Common commands

```bash
php artisan serve --port=8000        # dev server
npm run dev                          # Vite dev (HMR)
npm run build                        # production assets
php artisan migrate                  # run migrations
php artisan migrate:fresh --seed     # rebuild DB + seed admin user
php artisan queue:work               # process queued jobs
php artisan tinker
vendor/bin/pint                      # code style fix
php artisan test
```

## Accounts (local, after `migrate:fresh --seed`)

- **Admin:** `admin@digistack.test` / `password` (`is_admin = true`)
- **Test user:** `test@digistack.test` / `password` (created only in `local` env)

## Project structure & conventions

- **Layouts** (`resources/views/layouts/`):
  - `public.blade.php` → `<x-public-layout>` — marketing pages (header + footer partials)
  - `app.blade.php` → `<x-app-layout>` — authenticated user dashboard (Breeze nav)
  - `admin.blade.php` → `<x-admin-layout>` — admin area (sidebar)
  - `guest.blade.php` → `<x-guest-layout>` — auth pages
  - Layout component classes live in `app/View/Components/`
  - Shared `<head>` (meta, OG tags, dark-mode FOUC script, fonts, Vite, Livewire styles) is `resources/views/partials/head.blade.php`
- **Public site partials:** `resources/views/partials/public-header.blade.php`, `public-footer.blade.php`
- **Dark mode:** Tailwind `darkMode: 'class'`. The FOUC script in `partials/head` sets `.dark` on `<html>` from `localStorage.theme` (falls back to OS preference). Toggle button: `<x-theme-toggle />` (Alpine, persists to `localStorage`). Use `dark:` variants everywhere.
- **Brand color:** `brand-*` palette in `tailwind.config.js` (blue — `brand-600` is the primary). Logo: `<x-application-logo />`.
- **Admin guard:** middleware alias `admin` (`App\Http\Middleware\IsAdmin`), registered in `bootstrap/app.php`. Admin routes are in the `admin.` route-name group in `routes/web.php`. Check `auth()->user()->isAdmin()` in Blade.
- **Auth pages:** Volt components in `resources/views/livewire/pages/auth/`, routes in `routes/auth.php`. User must verify email (`User implements MustVerifyEmail`).
- **User model:** extra columns `phone`, `avatar`, `timezone` (default `UTC`), `is_admin` (bool). All in `$fillable`.
- **Naming:** when porting from `report-neuronarc`, rename `Report` → `Meeting` throughout (models, views, jobs, mailables, admin tables).
- Match the surrounding code style. Run `vendor/bin/pint` before committing.

## Build status (phases — see SPEC for detail)

- **Phase 1 — Setup: DONE.** Laravel + Livewire/Volt/Breeze/OpenAI installed; User model extended; 4 layouts + dark-mode toggle + DigiStack branding; `IsAdmin` middleware + `/admin` shell; admin seeder; placeholder public pages (`/`, `/features`, `/how-it-works`, `/pricing`, `/about`, `/contact`, `/blog`).
- **Phase 2 — Public marketing pages:** not started (flesh out Home, Pricing, Features, How It Works, About, Contact-with-form).
- **Phase 3 — Subscription core** (Plans, Subscriptions, Paysecure, Webhook, Invoice): not started.
- **Phase 4 — Calendar core** (meetings table, FullCalendar, CRUD): not started.
- **Phase 5 — AI title suggestion:** not started.
- **Phase 6 — Attendees + invites (ICS):** not started.
- **Phase 7 — Recurring meetings:** not started.
- **Phase 8 — Email reminders (queue + scheduler):** not started.
- **Phase 9 — Auto-renewal:** not started.
- **Phase 10 — Blog CMS:** not started.
- **Phase 11 — Admin panel:** not started.
- **Phase 12 — SEO + polish (sitemap, robots, meta):** not started.

## Git

Remote: Bitbucket `https://bitbucket.org/saddam_netgraph/digistack.git` (branch `main`).
Push needs Saddam's Bitbucket app password — the agent environment can't authenticate, so when a commit is ready, ask the user to `git push`.

## Pending external credentials (placeholders in `.env`)

`MAIL_*` (production SMTP), `PAYSECURE_*`, `OPENAI_API_KEY`, `SUPPORT_EMAIL`, real brand assets/logo, plan pricing.
