Web application for Dorisio β user-facing experience layer for sending tips and managing creator accounts.
π Deployed on Vercel: https://dorisio.vercel.app
The frontend is the dumb UI layer that:
- Renders state
- Calls SDK functions
- Zero business logic
- Consumes stabilized SDK API
Design principle: Frontend = experience only. All logic lives in backend or SDK.
- Framework: Next.js 14 (App Router) + TypeScript
- UI: Tailwind CSS + shadcn/ui
- Animation: Framer Motion
- State: Zustand (light client state), TanStack Query (server state)
- Forms: React Hook Form + Zod
- SDK: Dorisio-sdk (from workspace)
- Deployment: Vercel
- β User authentication (sign up / log in)
- β Creator profile pages (public profiles)
- β Creator discovery & search
- β Send tip flow (Freighter wallet integration)
- β Creator dashboard (earnings, transactions, wallet management)
- β Real-time blockchain confirmation tracking
- β Stellar testnet integration
- Node.js 20+ LTS
- Backend running (see
../backend) - SDK built (see
../sdk)
npm installCopy .env.example to .env.local:
cp .env.example .env.localUpdate values to match your backend:
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
npm run devsrc/
βββ app/ # Next.js App Router
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
β βββ (app)/ # Protected routes
β β βββ creators/[username]/page.tsx # Creator profile
β β βββ creators/[username]/dashboard/ # Creator dashboard
β β βββ creators/page.tsx # Discovery page
β βββ globals.css # Global styles
βββ components/
β βββ sections/ # Page sections
β β βββ dorisio-button.tsx # Send tip button
β β βββ dorisio-modal.tsx # Tip flow modal
β β βββ wallet-manager.tsx # Wallet management
β β βββ creator-spotlight.tsx # Featured creators
β βββ ui/ # Reusable UI components
β βββ shared/ # Shared utilities
βββ hooks/
β βββ use-create-tip.ts # Tip creation flow
β βββ use-wallet.ts # Wallet management
β βββ use-creator-balance.ts # Creator earnings
β βββ use-transaction-history.ts # Transaction list
βββ lib/
β βββ sdk-client.ts # SDK initialization
β βββ stellar/ # Stellar utilities
βββ stores/
β βββ auth-store.ts # Auth state (Zustand)
βββ types/
β βββ index.ts # TypeScript types
βββ utils/
βββ formatters.ts # Format utilities
βββ validators.ts # Zod schemas
| Route | Purpose | Auth Required |
|---|---|---|
/ |
Landing page with features | No |
/creators |
Creator discovery & search | No |
/creators/[username] |
Creator public profile | No |
/creators/[username]/dashboard |
Creator earnings & wallet | Yes |
NEXT_PUBLIC_API_URLβ Backend API base URL (required)NEXT_PUBLIC_STELLAR_NETWORKβtestnetormainnet(default:testnet)NEXT_PUBLIC_STELLAR_HORIZON_URLβ Stellar Horizon endpoint (default: testnet)
NEXT_PUBLIC_ENABLE_ANALYTICSβ Enable analytics (default:false)NEXT_PUBLIC_ENABLE_ERROR_REPORTINGβ Enable error reporting (default:false)
npm run dev # Start dev server (port 3000)
npm run build # Build for production
npm run start # Run production build
npm run lint # Run ESLint
npm run format # Format with Prettier
npm run type-check # Run TypeScript check- TypeScript: Strict mode, no
any - Formatting: Prettier (100 char line width)
- Linting: ESLint + Next.js rules
- Components: Server/client boundary is explicit
- Imports: Use
@/path alias for local imports
- Create file in
src/app/[route]/page.tsx - Use
'use client'at top (most pages need interactivity) - Use SDK hooks from context
- Keep logic minimal
Example:
'use client';
import { useCreatorBalance } from '@/hooks/use-creator-balance';
export default function CreatorDashboard() {
const { balance, loading, error } = useCreatorBalance(username);
if (loading) return <div>Loading...</div>;
if (error) return <div>Error: {error.message}</div>;
return <div>Total Earnings: ${balance?.totalEarnings}</div>;
}- Create in
src/components/ - Keep it presentational (props-driven)
- Logic lives in parent or SDK hooks
- Push code to GitHub
- Import repository in Vercel dashboard
- Set environment variables (see DEPLOYMENT.md)
- Deploy
vercel --prodSee DEPLOYMENT.md for:
- Environment variable configuration
- Vercel setup steps
- Health checks and monitoring
- Troubleshooting guide
β Don't do this:
// Business logic in component
const fee = amount * 0.025;
const total = amount + fee;β Do this:
// Business logic in backend/SDK
const result = await sdk.createTip({ creatorId, amount });β Don't do this:
const response = await fetch('http://api.dorisio.com/api/v1/tips', {
method: 'POST',
body: JSON.stringify(payload),
});β Do this:
const tip = await sdk.createTip(payload);- Server state (data from API) β TanStack Query
- Client state (UI state, auth token) β Zustand
- Component state (form input) β React useState
-
Create Account
- Go to home page, click "Sign Up"
- Enter email and password
- Verify email (testnet only)
-
Link Wallet
- Go to
/creators/[any-username]/dashboard - Click "+ Add Wallet"
- Sign challenge with Freighter wallet
- Go to
-
Send Tip
- Go to
/creators/[creator-username] - Click "π° Send a Tip"
- Enter amount, optional message
- Select wallet and confirm
- Wait for blockchain confirmation
- Go to
-
View Earnings
- Creator goes to their dashboard
- See earnings overview card
- Check transaction history table
- Verify wallet management section
- Frontend builds depend on SDK β build SDK first
- Never leak Stellar/blockchain logic into UI
- Keep routes simple β one responsibility per page
- Use Next.js middleware for auth guard routes (future)
- All API calls go through SDK, never directly to backend
For issues:
- Check browser console for errors
- Verify environment variables are set
- Check backend is running (NEXT_PUBLIC_API_URL)
- Review DEPLOYMENT.md for production issues
- Contact: support@dorisio.dev