A professional web onboarding platform for the Water Billing System SaaS. This web application handles marketing, signup, email verification, subscription activation, and guides users to the desktop application.
This is the web entry point for the Water Billing System. Users discover the product on the web, sign up, verify their email, activate a subscription, and then download the desktop app to manage their water utility operations.
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| TypeScript | Type safety |
| Vite | Build tool & dev server |
| Tailwind CSS | Utility-first styling |
| React Router v6 | Client-side routing |
| Framer Motion | Animations & transitions |
| Lucide React | Icons |
| Zustand | Lightweight state management |
water-billing-web/
├── public/
│ └── favicon.svg
├── src/
│ ├── main.tsx # Entry point
│ ├── App.tsx # Router configuration
│ ├── index.css # Global styles + Tailwind
│ ├── lib/
│ │ ├── utils.ts # Helper functions
│ │ └── api.ts # API client (connects to Rust backend)
│ ├── store/
│ │ └── authStore.ts # Zustand auth state management
│ ├── components/
│ │ ├── Navbar.tsx # Navigation bar
│ │ ├── Footer.tsx # Site footer
│ │ ├── Layout.tsx # Page layout wrapper
│ │ ├── AnimatedSection.tsx # Scroll animation wrapper
│ │ ├── StepIndicator.tsx # Multi-step progress indicator
│ │ ├── FeatureCard.tsx # Feature display card
│ │ └── PricingCard.tsx # Pricing plan card
│ └── pages/
│ ├── LandingPage.tsx # Home / Hero page
│ ├── FeaturesPage.tsx # Feature details
│ ├── PricingPage.tsx # Subscription plans
│ ├── TermsPage.tsx # Terms of Service
│ ├── PrivacyPage.tsx # Privacy Policy
│ ├── SubscriptionPolicyPage.tsx # Subscription Policy
│ ├── SignupPage.tsx # Registration (manual + Google)
│ ├── LoginPage.tsx # Sign in
│ ├── VerifyEmailPage.tsx # Email verification
│ ├── SubscriptionPage.tsx # Plan selection & activation
│ ├── OnboardingSuccessPage.tsx # Post-signup success
│ └── DesktopGuidePage.tsx # Desktop app instructions
├── index.html
├── package.json
├── vite.config.ts
├── tailwind.config.js
├── tsconfig.json
└── .env
| Route | Page | Auth Required |
|---|---|---|
/ |
Landing Page | No |
/features |
Features & Services | No |
/pricing |
Pricing Plans | No |
/terms |
Terms of Service | No |
/privacy |
Privacy Policy | No |
/subscription-policy |
Subscription Policy | No |
/signup |
Sign Up (manual + Google) | No |
/login |
Log In | No |
/verify-email |
Email Verification | No |
/subscription |
Choose Plan & Subscribe | Yes |
/onboarding |
Account Setup Success | Yes |
/desktop-guide |
Desktop App Guide | No |
[Visitor arrives]
|
v
[Landing Page] --> [Features] --> [Pricing]
| | |
| v v
| [Learn more] [Choose plan]
| | |
+--------------------+--------------+
|
v
[Signup Page]
|
+------------+------------+
| |
[Manual signup] [Google signup]
| |
v v
[Account created] [Account created]
| |
+------------+------------+
|
v
[Onboarding Success]
|
v
[Desktop App Guide]
|
v
[Download Desktop App]
- Node.js 18+
- The Rust backend API running
cd water-billing-web
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your API URL
# Start development server
npm run devThe app will be available at http://localhost:3000.
npm run buildOutput will be in the dist/ directory.
This web app connects to the Rust backend API at the URL specified in VITE_API_BASE_URL.
| Endpoint | Method | Description |
|---|---|---|
/auth/login |
POST | Authenticate user |
/auth/register |
POST | Manual signup |
/auth/google/register |
POST | Google signup |
/auth/verify-email |
GET | Verify email token |
/auth/resend-verification |
POST | Resend verification email |
/auth/me |
GET | Get current user |
/plans |
GET | List subscription plans |
/subscriptions |
POST | Create subscription |
- User fills out signup form (company name, admin name, email, phone, password)
- App sends
POST /auth/register - On success, user is redirected to onboarding page
- Email verification link is sent
- User clicks link in email to verify
- User clicks "Continue with Google"
- Google OAuth popup opens
- After Google auth, if company info is missing, user fills it in
- App sends
POST /auth/google/register - On success, user is redirected to onboarding page
- User sees account summary with company code
- User can copy the company code (needed for desktop login)
- User is guided to download the desktop app
- Desktop app login uses: company code + username + password
The desktop app should check these conditions on login:
- Company is active - Not suspended or deleted
- Subscription is active - Has active or trial subscription
- User is active - User account not disabled
If subscription is not active, the desktop app should show a message directing the user to the web portal to activate their subscription.
Edit tailwind.config.js to customize the brand colors:
colors: {
brand: { /* your colors */ },
water: { /* your colors */ },
}Edit the plans array in PricingPage.tsx and SubscriptionPage.tsx to match your actual subscription plans.
All page content is in the respective page components. Edit the text, features, and FAQ sections directly.
MIT