Applications Overview
Detailed overview of each application in the BISO Sites monorepo - Web, Admin, and Docs.
Applications Overview
The BISO Sites monorepo contains three Next.js applications, each serving a specific purpose. This document provides an overview of each application's role, features, and technical details.
Application Summary
| Application | Port | Purpose | Users |
|---|---|---|---|
| web | 3000 | Public website | Public visitors |
| admin | 3001 | Content management | Content managers, admins |
| docs | 3002 | Documentation | Developers |
Web Application
Purpose
The public-facing website that serves content to end users. This is what visitors see when they access your site.
Key Features
đ Internationalization
- Multi-language support (English, Norwegian)
- Automatic locale detection
- SEO-friendly localized URLs (
/en/about,/no/om)
đą Responsive Design
- Mobile-first approach
- Optimized for all screen sizes
- Touch-friendly interfaces
⥠Performance Optimized
- Server Components for fast initial load
- Image optimization with
next/image - Static generation where possible
- Efficient data fetching
đŗ Payment Integration
- Vipps checkout flow
- Order management
- Payment status tracking
đ¨ Dynamic Pages
- Puck editor-powered pages
- Render content created in admin
- Flexible page layouts
Technical Stack
// Key dependencies
{
"next": "^15.2.4",
"react": "^19.2.0",
"next-intl": "^4.3.9",
"@repo/api": "*",
"@repo/ui": "*",
"@repo/editor": "*",
"@repo/payment": "*"
}Directory Structure
Key Routes
| Route | Purpose |
|---|---|
/ | Homepage |
/[locale]/* | Localized content |
/api/payment/vipps/callback | Payment webhook |
/api/checkout/return | Payment return URL |
Environment Variables
# Appwrite
NEXT_PUBLIC_APPWRITE_ENDPOINT=
NEXT_PUBLIC_APPWRITE_PROJECT_ID=
APPWRITE_API_KEY=
# Payment
NEXT_PUBLIC_VIPPS_CLIENT_ID=
VIPPS_CLIENT_SECRET=
VIPPS_SUBSCRIPTION_KEY=
VIPPS_TEST_MODE=true
# Optional
NEXT_PUBLIC_GA_ID=Use Cases
- Content Consumption - Users read articles, view pages
- E-commerce - Browse products, make purchases
- User Interaction - Forms, comments, feedback
- Membership - Registration, login, profiles
For detailed web app development, see Web App Documentation.
Admin Application
Purpose
Content management system (CMS) where administrators and content creators manage all website content.
Key Features
đ Content Management
- Create and edit pages
- Manage posts and articles
- Media library management
đ¨ Visual Page Builder
- Puck editor integration
- Drag-and-drop page creation
- Real-time preview
- Component-based editing
đĨ User Management
- Create and manage users
- Role-based access control
- Permission management
đ Authentication
- Secure login system
- Session management
- Protected routes
đ¤ AI-Powered Features
- Content assistance
- Auto-generation capabilities
- Smart suggestions
đ Analytics Dashboard
- Content statistics
- User activity
- System health
Technical Stack
// Key dependencies
{
"next": "^15.2.4",
"react": "^19.2.0",
"next-intl": "^4.3.9",
"@repo/api": "*",
"@repo/ui": "*",
"@repo/editor": "*",
"@repo/payment": "*",
"@ai-sdk/openai": "^2.0.30"
}Directory Structure
Key Routes
| Route | Purpose |
|---|---|
/login | Admin login |
/admin/dashboard | Main dashboard |
/admin/pages | Page management |
/admin/pages/[id] | Edit page with Puck |
/admin/posts | Post management |
/admin/users | User management |
Authentication Flow
// Middleware protection
export async function middleware(request: NextRequest) {
// Check session
const { account } = await createSessionClient();
// Redirect to login if not authenticated
if (!account) {
return NextResponse.redirect('/login');
}
// Check permissions
const hasPermission = await checkPermissions(account);
if (!hasPermission) {
return NextResponse.redirect('/unauthorized');
}
return NextResponse.next();
}User Roles
| Role | Permissions |
|---|---|
| Super Admin | Full system access |
| Admin | Content + user management |
| Editor | Content creation/editing |
| Viewer | Read-only access |
Environment Variables
# Appwrite
NEXT_PUBLIC_APPWRITE_ENDPOINT=
NEXT_PUBLIC_APPWRITE_PROJECT_ID=
APPWRITE_API_KEY=
# AI Features
OPENAI_API_KEY=
# Admin Config
NEXT_PUBLIC_ADMIN_URL=http://localhost:3001Use Cases
- Page Creation - Build pages with visual editor
- Content Publishing - Create and publish articles
- User Administration - Manage users and permissions
- Media Management - Upload and organize assets
- System Configuration - Configure site settings
For detailed admin app development, see Admin App Documentation.
Docs Application
Purpose
Developer documentation site (this site!) built with Fumadocs. Provides comprehensive documentation for developers working on the project.
Key Features
đ MDX-Based Content
- Write docs in Markdown with JSX components
- Code syntax highlighting
- Interactive examples
đ Search
- Full-text search
- Keyboard shortcuts
- Fast and accurate
đ¨ Custom Components
- Callouts for important information
- Tabs for multiple examples
- Steps for tutorials
- File tree visualization
đą Responsive Documentation
- Mobile-friendly
- Dark mode support
- Accessible navigation
⥠Static Generation
- All docs pre-rendered
- Fast page loads
- SEO optimized
Technical Stack
// Key dependencies
{
"next": "^16.0.0",
"react": "^19.2.0",
"fumadocs-core": "^16.0.11",
"fumadocs-mdx": "^13.0.8",
"fumadocs-ui": "^16.0.11",
"@repo/ui": "*"
}Directory Structure
Custom MDX Components
Available in all documentation:
<Callout type="info" title="Title">
Important information
</Callout>
<Steps>
<Step title="First">Content</Step>
<Step title="Second">Content</Step>
</Steps>
<FileTree>
<FileTreeItem name="src/" icon="đ">
<FileTreeItem name="app/" icon="đ" depth={1} />
</FileTreeItem>
</FileTree>Creating Documentation
---
title: Page Title
description: Page description for SEO
---
import { Callout } from 'components/callout';
# Page Title
Your content here...
<Callout type="warning">
Important note
</Callout>Environment Variables
Docs typically don't need environment variables for local development.
Use Cases
- Onboarding - Help new developers get started
- API Reference - Document package APIs
- Guides - Tutorials and best practices
- Architecture - System design documentation
- Troubleshooting - Common issues and solutions
To maintain this docs site, continue to the Docs Application section below.
Shared Infrastructure
All three applications share:
Package Dependencies
@repo/api- Appwrite clients@repo/ui- UI components@repo/eslint-config- Linting rules@repo/typescript-config- TypeScript config
Common Technologies
- Next.js 15+ with App Router
- React 19
- TypeScript 5.9
- Tailwind CSS
- Bun for package management
- Turborepo for build orchestration
Development Scripts
# Start specific app
bun run dev --filter=web
bun run dev --filter=admin
bun run dev --filter=docs
# Build specific app
bun run build --filter=web
# Type check
bun run check-types
# Lint
bun run lintApplication Communication
Direct Database Access
Each app connects directly to Appwrite:
// No inter-app API calls
// Each app queries Appwrite independently
// In web app
const { db } = await createSessionClient();
const posts = await db.listDocuments('posts');
// In admin app (same database)
const { db } = await createAdminClient();
const posts = await db.listDocuments('posts');Shared Content
Content created in admin is available in web:
- Admin creates/edits page
- Saves to Appwrite database
- Web app queries and displays page
- No sync needed - same database
Independent Deployments
Each app can be deployed independently:
- Different domains/subdomains
- Different hosting providers
- Different scaling strategies
- Independent versioning
Comparison Table
| Feature | Web | Admin | Docs |
|---|---|---|---|
| Target Users | Public | Content creators | Developers |
| Authentication | Optional | Required | None |
| Database Access | Read-mostly | Read + Write | None (static) |
| Internationalization | Yes | Yes | No (English only) |
| Payment | Yes | No | No |
| Page Builder | Render only | Edit + Render | No |
| Static Export | Possible | No | Yes |
| SEO Important | Critical | No | Important |
Next Steps
Ready to learn more about each application?
-
Docs App Deep Dive (this page)
Or continue with:
