Skip to content

Latest commit

Β 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PujaCircle πŸ•‰οΈ

"Traditional rituals, made easier for modern India."

PujaCircle is a web-first platform designed to help devotees across Indian urban centers arrange traditional Vedic rituals, pujas, and ceremonies by connecting them with verified, knowledgeable purohits with transparent, priest-specific pricing and offline cash Dakshina.


πŸ“Œ Repository Boundary & Status

This repository is structured for seamless collaboration by a 5-person engineering team. The repository enforces clean architectural boundaries:

Layer Implementation Status Description
Frontend UI Application 🟒 Fully Implemented & Modular Clean React 19 + TypeScript + Vite architecture. Fully functional user portal (/user/*), priest dashboard (/priest/*), and admin console (/admin/*). All pages modularized into small (< 150 lines), beginner-friendly components.
Frontend Mock Engine 🟒 Fully Functional (33/33 Tests Pass) Complete in-memory mock database, delay simulation, priest-specific pricing, price snapshot locking, 5-hour booking response windows, and verified 5-star ratings.
Frontend Design System 🟒 Complete Modern semantic design tokens (Saffron, Regal Maroon, Gold, Warm Ivory), accessible typography, and official shadcn/ui components.
Backend Services & DB 🟑 Architecture Scaffolds Express, Drizzle ORM, Zod schemas, and security middleware scaffolds.
Documentation (docs/) 🟒 Source of Truth Comprehensive specifications (PRD, SRS, UX flows, API contracts, architecture diagrams).

🚫 Hard Product Constraints (Phase 1)

These constraints are NON-NEGOTIABLE:

  1. Web Only: No mobile applications. Fully responsive web design.
  2. No Live Priest Tracking: No GPS or real-time map tracking.
  3. No Online Priest Payments: Priests are remunerated offline directly in cash upon ceremony completion. Booking statuses: PENDING β†’ CONFIRMED / REJECTED / EXPIRED / CANCELLED β†’ COMPLETED.
  4. No E-Commerce: Samagri item delivery belongs to Phase 2.
  5. Priest-Specific Pricing: Priests define their own cash Dakshina per service via PriestService. The price is locked authoritatively into the booking at request time.
  6. Priest Approval Required: Devotees verify via phone/email OTP; Purohits verify via OTP followed by manual admin review and approval.
  7. Simplified Indian Address Model: PIN code auto-resolves locality, village/town, district, and state.
  8. 5-Hour Priest Response Window: Purohits have 5 hours to accept or decline before a booking expires.
  9. Verified Ratings Only: 1–5 star ratings are permitted only on COMPLETED ceremonies by the devotee who booked.

πŸ› οΈ Technology Stack

Frontend

  • Framework: React 19 + TypeScript + Vite
  • Styling: Tailwind CSS + CSS Variables Design System
  • UI Components: shadcn/ui + Radix UI primitives + Lucide React
  • Routing: React Router v7
  • State Management: Zustand
  • Forms & Validation: React Hook Form + Zod + @hookform/resolvers
  • HTTP Client: Axios (configured with credentials and base URL)
  • Utilities: date-fns, sonner (toasts), clsx, tailwind-merge

Backend (Scaffolded Placeholder)

  • Runtime: Node.js + Express + TypeScript (tsx)
  • ORM & Database: Drizzle ORM + PostgreSQL (Supabase)
  • Security & Utilities: zod, jsonwebtoken, bcryptjs, helmet, cookie-parser, cors, dotenv, imagekit

πŸ“ Repository Structure

pujaCircle/
β”œβ”€β”€ frontend/                     # React 19 + Vite + Tailwind + shadcn/ui application
β”‚   β”œβ”€β”€ public/                   # Static assets
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/                  # Lightweight API service wrappers
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ address/          # AddressModal, AddressCard
β”‚   β”‚   β”‚   β”œβ”€β”€ admin/            # PriestApprovalTable, UserManagementTable, PriestActionDialogs, UserActionDialogs
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/             # AuthLoginForm, OtpVerificationCard, Forgot/Reset Cards
β”‚   β”‚   β”‚   β”œβ”€β”€ booking/          # BookingStatusBadge, RatingModal, CancelBookingDialog, BookingTimelineCard
β”‚   β”‚   β”‚   β”œβ”€β”€ common/           # ErrorBoundary, RoleRouteGuard, LoadingSpinner, EmptyState
β”‚   β”‚   β”‚   β”œβ”€β”€ layout/           # Header, Footer, PriestLayout, AdminLayout, PublicLayout
β”‚   β”‚   β”‚   β”œβ”€β”€ priest/           # AddSlotModal, ServiceFormModal, PriestBookingRow, PriestBookingDetailsDialog
β”‚   β”‚   β”‚   └── ui/               # Reusable shadcn/ui primitives
β”‚   β”‚   β”œβ”€β”€ lib/                  # Utilities (formatINR, formatDate, cn, constants, config)
β”‚   β”‚   β”œβ”€β”€ mocks/                # Mock DB, Mock APIs, artificial network delay, 11-suite test runner
β”‚   β”‚   β”œβ”€β”€ pages/                # Thin, readable page orchestrators (< 150 lines each)
β”‚   β”‚   β”‚   β”œβ”€β”€ admin/            # AdminDashboard, AdminPriests, AdminPriestDetails, AdminUsers, AdminProfile
β”‚   β”‚   β”‚   β”œβ”€β”€ auth/             # Devotee, Priest & Admin login/register/recovery pages
β”‚   β”‚   β”‚   β”œβ”€β”€ priest/           # PriestDashboard, PriestServices, PriestAvailability, PriestBookings, PriestProfile
β”‚   β”‚   β”‚   β”œβ”€β”€ public/           # HomePage, AboutPage, ContactPage, PriestListingPage, PriestDetailsPage
β”‚   β”‚   β”‚   └── user/             # UserHomePage, BookingsPage, BookingDetailsPage, AddressesPage, ProfilePage
β”‚   β”‚   β”œβ”€β”€ routes/               # App router with role guards and code-split lazy loading
β”‚   β”‚   β”œβ”€β”€ schemas/              # Strict Zod validation schemas
β”‚   β”‚   β”œβ”€β”€ store/                # Zustand stores (auth.store, booking.store)
β”‚   β”‚   β”œβ”€β”€ types/                # TypeScript interfaces (priest, booking, address, auth, user)
β”‚   β”‚   β”œβ”€β”€ App.tsx               # Root component with ErrorBoundary
β”‚   β”‚   β”œβ”€β”€ index.css             # Theme variables & typography
β”‚   β”‚   └── main.tsx              # Application entrypoint
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ backend/                      # Express + Drizzle architectural scaffold
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/               # Environment & DB config skeletons
β”‚   β”‚   β”œβ”€β”€ controllers/          # Controller skeletons
β”‚   β”‚   β”œβ”€β”€ db/                   # Schema definitions & seed skeletons
β”‚   β”‚   β”œβ”€β”€ middlewares/          # Auth, role, error & validation middlewares
β”‚   β”‚   β”œβ”€β”€ routes/               # Express route skeletons
β”‚   β”‚   β”œβ”€β”€ services/             # Service skeletons
β”‚   β”‚   β”œβ”€β”€ types/                # Express type extensions
β”‚   β”‚   β”œβ”€β”€ utils/                # Response helpers & logger
β”‚   β”‚   β”œβ”€β”€ validations/          # Zod validation skeletons
β”‚   β”‚   β”œβ”€β”€ app.ts                # Express app setup
β”‚   β”‚   └── server.ts             # HTTP server entrypoint
β”‚   β”œβ”€β”€ drizzle/                  # Migration directory
β”‚   β”œβ”€β”€ drizzle.config.ts
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ docs/                         # Comprehensive Documentation (Source of Truth)
β”‚   β”œβ”€β”€ 01-product/               # PRD, SRS, Scope, User Personas
β”‚   β”œβ”€β”€ 02-design/                # Design tokens, Color palette, Typography, UX flows
β”‚   β”œβ”€β”€ 03-architecture/          # System, Frontend, Backend, DB & Deployment architecture
β”‚   β”œβ”€β”€ 04-api/                   # REST API contracts & endpoint specifications
β”‚   β”œβ”€β”€ 05-database/              # ERD, Backend schema specifications, Relationships, Seed data
β”‚   β”œβ”€β”€ 06-diagrams/              # Mermaid workflow and sequence diagrams
β”‚   β”œβ”€β”€ 07-development/           # Setup, Git workflow, Branching, PR guidelines, Code style
β”‚   β”œβ”€β”€ 08-ai/                    # AI development rules, SKILLS.md, Prompts, Review guide
β”‚   └── 09-testing/               # Test plan, Test cases, Edge cases, Acceptance tests
β”‚
β”œβ”€β”€ .github/                      # Automated CI testing pipeline (ci.yml)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json                  # Root runner & developer scripts
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js: v20.x or higher
  • npm: v10.x or higher

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd pujaCircle
  2. Install all dependencies:

    # Install root dependencies
    npm install
    
    # Install frontend dependencies
    cd frontend && npm install && cd ..
    
    # Install backend dependencies
    cd backend && npm install && cd ..
  3. Configure Environment Variables:

    cp frontend/.env.example frontend/.env
    cp backend/.env.example backend/.env

πŸ’» Running the Application

Running Frontend with Mock API (Recommended for UI Development)

The frontend is preconfigured to run with the functional Mock API layer without needing a backend server:

npm run frontend

Visit http://localhost:5173 in your browser.

Running Both Frontend & Backend Concurrently

npm run dev

Validating Mock APIs & Business Rules

Run the 11 comprehensive automated SRS test suites directly in the terminal:

npm run test:mock

πŸ§ͺ Demo Test Credentials

Role Login Identifier Password Access Portal
Devotee +919876543210 User@123 /user/login (Redirects to /user/home)
Purohit (Approved) +919876543211 Priest@123 /priest/login (Redirects to /priest/dashboard)
Purohit (Pending) +919876543213 Priest@123 /priest/login (Redirects to /priest/pending-approval)
Administrator admin@pujacircle.demo Admin@123 /admin/login (Redirects to /admin/dashboard)

🎨 Design System & Theme

PujaCircle utilizes a spiritual yet modern visual identity defined via CSS variables in frontend/src/index.css:

  • Primary (--primary / --brand-saffron): Sacred Saffron / Deep Orange (hsl(28, 92%, 52%))
  • Secondary (--secondary / --brand-maroon): Deep Regal Maroon (hsl(348, 65%, 28%))
  • Accent (--accent / --brand-gold): Warm Temple Gold (hsl(42, 85%, 55%))
  • Background (--background / --brand-ivory): Warm Ivory Neutral (hsl(40, 33%, 98%))
  • Foreground (--foreground / --brand-charcoal): Deep Charcoal (hsl(220, 20%, 14%))

πŸ“– Documentation Quick Links

  • Product Requirements Document (PRD)
  • Software Requirements Specification (SRS)
  • Frontend Architecture Specification
  • Design System & UX Flows
  • API Contracts
  • Backend Database Schema

About

PujaCircle is a web-only platform designed to help busy individuals and families across Indian urban centers arrange traditional Vedic rituals, pujas, and ceremonies by connecting them with verified, knowledgeable priests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages