diff --git a/src/app/docs/api/ai-service/page.mdx b/src/app/docs/api/ai-service/page.mdx
index 0ad6873..ac05f38 100644
--- a/src/app/docs/api/ai-service/page.mdx
+++ b/src/app/docs/api/ai-service/page.mdx
@@ -1,8 +1,3 @@
-export const metadata = {
- title: 'AI Service API - NeuroLab Documentation',
- description: 'API Reference for the NeuroLab AI and Signal Processing service.',
-}
-
# AI Service API
The AI Service provides endpoints for EEG analysis, mental state classification, and voice processing.
diff --git a/src/app/docs/api/backend/page.mdx b/src/app/docs/api/backend/page.mdx
index 89dcfc3..a39d9a2 100644
--- a/src/app/docs/api/backend/page.mdx
+++ b/src/app/docs/api/backend/page.mdx
@@ -1,8 +1,3 @@
-export const metadata = {
- title: 'Backend API - NeuroLab Documentation',
- description: 'Current route overview for the NeuroLab Express backend.',
-}
-
# Backend API
The NeuroLab backend is an Express service that owns authentication, user and doctor workflows, appointments, uploads, reports, billing, notifications, and chat orchestration.
diff --git a/src/app/docs/api/page.mdx b/src/app/docs/api/page.mdx
new file mode 100644
index 0000000..0c0b516
--- /dev/null
+++ b/src/app/docs/api/page.mdx
@@ -0,0 +1,49 @@
+import Link from 'next/link'
+import { ArrowRight, Brain, Server, Code2 } from 'lucide-react'
+
+# API Reference
+
+This section groups the two API surfaces documented in this repository:
+
+- the backend API, which handles platform workflows
+- the AI service API, which handles analysis and inference endpoints
+
+If you need a route map first, start with one of the cards below.
+
+
+
+
+
+ Backend API
+
+
+
+ Route groups, operational notes, and the current backend surface.
+
+
+
+
+
+
+ AI Service API
+
+
+
+ EEG analysis, voice analysis, and model/status endpoints.
+
+
+
+
+## What to expect
+
+
+
+
+
+
This section is documentation only.
+
+ The pages here summarize the API surfaces that the wider NeuroLab platform exposes. They do not imply that the service source code lives in this repository.
+
+
+
+
diff --git a/src/app/docs/architecture/page.mdx b/src/app/docs/architecture/page.mdx
index c067302..b2d1ecd 100644
--- a/src/app/docs/architecture/page.mdx
+++ b/src/app/docs/architecture/page.mdx
@@ -4,74 +4,61 @@ import {
Callout,
} from '@/components/mdx-components'
-export const metadata = {
- title: 'Architecture - NeuroLab Documentation',
- description: 'Documented runtime architecture for the current NeuroLab codebase.',
-}
-
# Architecture
-NeuroLab currently spans a backend application, an AI service, client applications, and supporting infrastructure. This page focuses on the runtime shape that is visible in the repository today.
+NeuroLab is documented here as a layered system: clients, backend API, AI service, and supporting infrastructure.
- This page describes the current documented runtime. If architecture notes elsewhere in the repository disagree, trust the active service entrypoints and route files first.
+ This page summarizes the architecture model used by the docs site. It does not assert that the service source code lives in this repository.
## System Overview
-The current repository is best understood as four operational layers:
+The platform is described as four operational layers:
- `platform/`, `webapp/`, `docs/`, and `ecommerce/` sit at the edge of the
- system. They consume backend HTTP APIs and expose different product
- surfaces: platform workflows, user-facing web experiences, and
- documentation.
+ The docs site sits alongside the platform-facing applications and
+ describes the supported workflows, setup, and reference surfaces.
- The backend owns authentication, user and doctor workflows, appointments,
- uploads, reports, notifications, billing, and chat orchestration. It also
- exposes Swagger at `/api-docs` and acts as the main application boundary
- for most clients.
+ The backend is the primary HTTP boundary for users, appointments,
+ uploads, reports, billing, notifications, and related workflows.
- The active AI runtime lives under `AI Service/backend`. It handles EEG
- analysis, voice analysis, recommendations, reports, chat workflows, model
- calibration, and optional streaming. Versioned routes are exposed under
- `/api/v1/*`.
+ The AI service covers EEG analysis, voice processing, report generation,
+ and model-related endpoints under a versioned API prefix.
- MongoDB is the primary application datastore. Redis supports queue-backed
- workloads and background processing. MQTT and gRPC exist as integration
- mechanisms for device and service-to-service communication in specific
- flows.
+ Supporting services include the datastore, queueing, and object storage
+ layers that the backend and AI service depend on.
@@ -79,62 +66,51 @@ The current repository is best understood as four operational layers:
### Backend Responsibilities
-- API surface for `/api/auth`, `/api/users`, `/api/admin`, `/api/doctors`,
- `/api/devices`, `/api/sessions`, `/api/analysis`, `/api/uploads`,
- `/api/reports`, `/api/appointments`, `/api/calendar`, `/api/notifications`,
- `/api/clinics`, `/api/billing`, and `/api/chat`
-- auth and token issuance
+- authentication and token issuance
- application data persistence
-- appointment, billing, and workflow orchestration
-- chat conversation persistence and AI job reconciliation
+- appointments, uploads, reports, billing, notifications, and chat workflows
+- route groups summarized in the backend API reference
### AI Service Responsibilities
-- versioned FastAPI routing under `/api/v1`
+- versioned API routing
- EEG analysis endpoints
- voice analysis endpoints
-- model calibration
-- report generation jobs
-- chat request processing, including queued background mode
+- report generation and model-related workflows
## Integration Patterns
| Mechanism | Current Role | Notes |
| :--- | :--- | :--- |
| **HTTP/REST** | Primary application integration | Main client and service API surface |
-| **Swagger/OpenAPI** | Backend schema discovery | Exposed by the backend at `/api-docs` |
-| **Versioned FastAPI routes** | AI service contract | Canonical AI surface is `/api/v1/*` |
-| **Redis/RQ** | Background processing | Used for queued AI chat and report workflows |
-| **gRPC** | Targeted service-to-service context exchange | Present in current backend and AI chat/context paths |
-| **MQTT** | Device and notification integration | Present as an optional real-time integration mechanism |
+| **OpenAPI/Swagger** | Backend schema discovery | The backend API page points to the generated schema |
+| **Versioned API routes** | AI service contract | The AI service API is documented under a versioned prefix |
+| **Queue-backed jobs** | Background processing | Used for asynchronous analysis and report workflows |
## Runtime Shape
```text
Client applications
- -> Backend API (Express)
- -> AI service (FastAPI) for analysis, reports, and chat
- -> MongoDB / Redis / storage / optional messaging integrations
+ -> Backend API
+ -> AI service for analysis and inference
+ -> Data, queueing, and storage services
```
## Architectural Notes
- The repository also contains older or alternate architectural traces. For
- documentation work, treat `AI Service/backend` as the primary AI runtime
- unless the goal is explicitly historical or comparative.
+ Keep the architecture page aligned with the routes and pages that exist in
+ this docs repository. Avoid adding directory-level claims unless the source
+ code is actually present here.
### What is stable
-- backend route groups and Swagger exposure
+- backend route summaries and OpenAPI entrypoints
- AI service versioned API prefix
-- Vite-based `platform` and `webapp` clients
- docs app as a separate Next.js application
### What is integration-sensitive
-- MQTT-dependent flows
-- gRPC-dependent context exchange
-- Redis-backed async jobs
-- deployment assumptions across the various frontend apps
+- queue-backed async jobs
+- deployment assumptions across the documented setup pages
diff --git a/src/app/docs/concepts/eeg-processing/page.mdx b/src/app/docs/concepts/eeg-processing/page.mdx
index 38a58c3..501d6f8 100644
--- a/src/app/docs/concepts/eeg-processing/page.mdx
+++ b/src/app/docs/concepts/eeg-processing/page.mdx
@@ -1,8 +1,3 @@
-export const metadata = {
- title: 'EEG Signal Processing - NeuroLab Documentation',
- description: 'Learn about the core EEG signal processing pipeline, from raw signal ingestion to feature extraction.',
-}
-
# EEG Signal Processing
NeuroLab employs a state-of-the-art EEG signal processing pipeline designed to handle noisy real-world data and extract meaningful features for mental state classification.
@@ -85,25 +80,25 @@ The extracted features are further prepared for the machine learning models:
## Next Steps
-Learn how these features are combined with voice data for multimodal analysis:
+Continue with the mental state model or the AI service reference:
diff --git a/src/app/docs/concepts/mental-states/page.mdx b/src/app/docs/concepts/mental-states/page.mdx
index e676709..bb4e81d 100644
--- a/src/app/docs/concepts/mental-states/page.mdx
+++ b/src/app/docs/concepts/mental-states/page.mdx
@@ -1,8 +1,3 @@
-export const metadata = {
- title: 'Mental States - NeuroLab Documentation',
- description: 'Understanding the mental state classification system in NeuroLab.',
-}
-
# Mental States
NeuroLab's primary goal is to classify human brain activity and emotional markers into actionable mental states. The system currently recognizes three primary states.
diff --git a/src/app/docs/installation/ai-service/page.mdx b/src/app/docs/installation/ai-service/page.mdx
index 4e6021e..51eda11 100644
--- a/src/app/docs/installation/ai-service/page.mdx
+++ b/src/app/docs/installation/ai-service/page.mdx
@@ -1,10 +1,9 @@
-export const metadata = {
- title: 'AI Service Setup - NeuroLab Documentation',
- description: 'Step-by-step guide to installing and configuring the NeuroLab AI Service.',
-}
-
# AI Service Setup
+This page documents the AI service setup flow for the broader NeuroLab
+platform. It assumes you have access to the platform source tree outside this
+docs repository.
+
The AI Service is the computational heart of NeuroLab, handling EEG signal processing, voice emotion detection, and machine learning inference. It is built with FastAPI and Python.
## Prerequisites
diff --git a/src/app/docs/installation/backend/page.mdx b/src/app/docs/installation/backend/page.mdx
index eadef50..31e199a 100644
--- a/src/app/docs/installation/backend/page.mdx
+++ b/src/app/docs/installation/backend/page.mdx
@@ -1,10 +1,9 @@
-export const metadata = {
- title: 'Backend Setup - NeuroLab Documentation',
- description: 'Step-by-step guide to installing and configuring the NeuroLab Express.js backend.',
-}
-
# Backend Setup
+This page documents the backend setup flow for the broader NeuroLab platform.
+It assumes you are working from the platform source tree rather than this docs
+repository alone.
+
The Backend service provides the core API for NeuroLab, managing users, clinical data, billing, and orchestrating analysis sessions. It is built with Node.js and Express.
## Prerequisites
diff --git a/src/app/docs/installation/docker/page.mdx b/src/app/docs/installation/docker/page.mdx
index 49239a3..5d0bfdf 100644
--- a/src/app/docs/installation/docker/page.mdx
+++ b/src/app/docs/installation/docker/page.mdx
@@ -1,10 +1,8 @@
-export const metadata = {
- title: 'Docker Setup - NeuroLab Documentation',
- description: 'Learn how to deploy the entire NeuroLab platform using Docker and Docker Compose.',
-}
-
# Docker Setup
+This page assumes you are deploying the broader NeuroLab platform, not just
+this docs repository.
+
Docker is the recommended way to deploy NeuroLab in both development and production environments. It ensures consistency across different systems and simplifies the management of multiple services and databases.
## Prerequisites
diff --git a/src/app/docs/installation/production/page.mdx b/src/app/docs/installation/production/page.mdx
index 3dc1b73..e888928 100644
--- a/src/app/docs/installation/production/page.mdx
+++ b/src/app/docs/installation/production/page.mdx
@@ -1,10 +1,8 @@
-export const metadata = {
- title: 'Production Deployment - NeuroLab Documentation',
- description: 'Learn how to deploy the NeuroLab platform to production environments using Render, Vercel, and managed databases.',
-}
-
# Production Deployment
+This page assumes you are deploying the broader NeuroLab platform. It does not
+describe infrastructure contained in this docs repository itself.
+
Deploying NeuroLab to production requires a distributed approach to ensure scalability, security, and reliability. We recommend using managed services to reduce operational overhead.
## Deployment Architecture
diff --git a/src/app/docs/page.mdx b/src/app/docs/page.mdx
index 4bcc9da..9594c71 100644
--- a/src/app/docs/page.mdx
+++ b/src/app/docs/page.mdx
@@ -1,95 +1,90 @@
import { Callout } from '@/components/mdx-components'
-import { Info, Network, Server, BrainCircuit, Database, ArrowRight, Lightbulb, Compass, Code2 } from 'lucide-react'
+import { Info, BookOpen, BrainCircuit, Boxes, Code2, ArrowRight } from 'lucide-react'
import Link from 'next/link'
-export const metadata = {
- title: 'Introduction - NeuroLab Documentation',
- description: 'High-level overview of the NeuroLab product, runtime system, and documentation scope.',
-}
-
# Introduction
-NeuroLab is a clinical platform backed by AI services, user applications, and operational infrastructure.
+This repository is a documentation site. It does not contain the NeuroLab application services themselves.
-This repository combines application workflows, analysis services, client applications, and supporting infrastructure into a single unified system. This documentation is organized around the current runtime shape of that system, serving as the canonical source of truth for developers and operators.
+The pages here summarize the platform at a practical level: what the system is, how the main pieces fit together, how to install the documented services, and how to read the API surfaces.
}>
- This site is intentionally conservative. If a docs page and the codebase disagree, always treat the active backend, AI service, and client entrypoints as the source of truth.
+ Treat these pages as a guide to the documented platform, not as proof that the runtime code is present in this repository.
## System Overview
-NeuroLab is a layered application, not a single monolithic service. The product surface users interact with is supported by a backend API, an AI runtime, multiple frontends, and a set of persistence and messaging services.
+NeuroLab is documented as a layered system. The site separates overview content, setup guidance, concepts, and API reference so you can move from orientation to implementation details without guesswork.
-
- Client Applications
+
+ Getting Started
- Multiple user-facing applications (platform, webapp, docs, ecommerce) built on different frameworks.
+ A short path through the prerequisites, quick start, and architecture summary.
-
- Backend API
+
+ Concepts
- The main application boundary. Owns users, doctors, appointments, uploads, and conversation persistence.
+ EEG processing and mental state explanations that the rest of the docs build on.
-
- AI Inference Service
+
+ Installation
- The canonical AI runtime exposing EEG analysis, voice processing, and recommendations via versioned FastAPI routes.
+ Setup notes for the backend, AI service, Docker, and production deployment.
-
- Infrastructure
+
+ API Reference
- MongoDB, Redis, object storage, and gRPC integrations handling background jobs and real-time state.
+ The backend and AI service API summaries are grouped under a single entry point.
## Repository Architecture
-This mono-repo mixes product code, service code, and documentation. The table below explains the primary directories you will interact with.
+This repository only contains the docs app. The sections below explain the documentation structure you can browse here.
-
Directory
+
Section
Current Role
-
`backend/`
-
Main Express application and primary client-facing API surface.
+
`Getting Started`
+
Overview, quick start, and prerequisites.
-
`AI Service/backend/`
-
Canonical AI runtime for analysis, reports, and chat workflows.
+
`Concepts`
+
EEG processing and mental state explanations.
-
`platform/` & `webapp/`
-
User-facing clients that consume backend APIs and operational workflows.
+
`Installation`
+
Setup guidance for the documented services and deployment paths.
-
`docs/`
-
This documentation application detailing the runtime and integration model.
+
`API Reference`
+
Entry points for the backend and AI service API pages.
@@ -100,35 +95,35 @@ Select a path below to continue your journey through the NeuroLab system.
-
+
Quick Start
- Fast summary of the active runtime and recommended startup order.
+ Fast summary of the documented runtime and recommended reading order.
-
+
Architecture
- Deep dive into service boundaries, dependencies, and operational layers.
+ High-level system boundaries and how the docs organize them.
-
+
- Backend API
+ API Reference
- Reference for route groups, responsibilities, and integration points.
+ Route summaries for the backend and AI service.
diff --git a/src/app/docs/prerequisites/page.mdx b/src/app/docs/prerequisites/page.mdx
index c328fb4..9a8b499 100644
--- a/src/app/docs/prerequisites/page.mdx
+++ b/src/app/docs/prerequisites/page.mdx
@@ -19,12 +19,6 @@ import {
TableRow,
} from '@/components/ui/table'
-export const metadata = {
- title: 'Prerequisites - NeuroLab Documentation',
- description:
- 'Infrastructure, Docker, and runtime prerequisites for the current NeuroLab stack.',
-}
-
Prerequisites
@@ -32,17 +26,16 @@ export const metadata = {
Prepare the runtime layers before you start individual services.
- NeuroLab does not currently ship as one clean root Docker stack. The
- reliable approach is to think in layers: host tooling, infrastructure
- containers, application services, and then client apps.
+ The setup pages assume you have the required runtimes and can reach the
+ services they describe. This docs repository does not contain the
+ services themselves.
}>
- The repository contains separate Compose files for `backend/` and
- `AI Service/backend/`, but they are not fully aligned. This page reflects the
- actual runtime dependencies in code, not an idealized single-stack deployment.
+ The setup instructions below are intentionally high level. Use them as a
+ checklist before following the service-specific pages.
@@ -69,7 +62,7 @@ export const metadata = {
stack='3.11 preferred'
icon='ai'
>
- Required for the active AI runtime under `AI Service/backend`.
+ Required for the AI service setup page.
Run these after the dependency layer is reachable. They each have their
@@ -275,7 +268,7 @@ export const metadata = {
- backend/docker-compose.yml
+ backend stack
Broad dependency stack, but stale AI wiring
@@ -283,16 +276,16 @@ export const metadata = {
It defines MongoDB, Redis, MinIO, InfluxDB, Mosquitto, backend, and an
- AI service. But the AI build context points to `./ai.neurolab`, which
- does not exist in the current repository, so this file is not a
- trustworthy full-stack source of truth as-is.
+ AI service. But the AI build context is not aligned with the docs
+ repository, so this file should not be treated as a trustworthy
+ full-stack source of truth as-is.
- AI Service/backend/docker-compose.yml
+ AI service stack
Better AI-specific stack, but missing MongoDB
diff --git a/src/app/docs/quick-start/page.mdx b/src/app/docs/quick-start/page.mdx
index 0dfc195..9f9a9ef 100644
--- a/src/app/docs/quick-start/page.mdx
+++ b/src/app/docs/quick-start/page.mdx
@@ -19,12 +19,6 @@ import {
TableRow,
} from '@/components/ui/table'
-export const metadata = {
- title: 'Quick Start - NeuroLab Documentation',
- description:
- 'Fast orientation to the active NeuroLab runtime components and setup flow.',
-}
-
Quick Start
@@ -33,16 +27,16 @@ export const metadata = {
This page is not the full installation manual. It is the compressed view
- of the core runtime pieces, what each one does, and the order in which to
- bring them up locally.
+ of the documented setup sequence and the order in which to read the
+ supporting pages.
}>
Read this page before diving into service-specific setup. It gives you the
- runtime map you need so the backend, AI service, and clients make sense in
- relation to each other.
+ page map you need so the backend, AI service, and related concepts make
+ sense in relation to each other.
@@ -52,8 +46,8 @@ export const metadata = {
The pieces you should care about first
- A local NeuroLab run usually starts with a datastore layer, then the
- backend, then the AI service, then one of the client applications.
+ A local NeuroLab run usually starts with prerequisites, then the backend
+ or AI service pages, then the API reference and concepts.
@@ -61,43 +55,39 @@ export const metadata = {
- This is the main application API. Most clients talk to the backend first,
- and the backend coordinates application data, user workflows, and calls
- into AI services when needed.
+ Start here if you want the shortest path through the documented pages.
- The active AI runtime under `AI Service/backend` provides inference and
- analysis functionality. It is a separate service with its own runtime,
- environment, and optional queue-backed features.
+ The AI service pages describe the analysis and inference surface at a
+ level suitable for setup and integration.
- Once the backend is running, you can use one of the client apps to
- exercise the system. These clients depend on backend connectivity, not on
- direct AI-service integration in normal flows.
+ The docs app helps you navigate the rest of the documented platform.
- The Data and Infrastructure exposes the main datastores, object storage, queuing systems, and deployment orchestration for the system.
+ The supporting services page group covers the external systems the docs
+ refer to, such as datastores, queues, and storage.
@@ -137,7 +127,7 @@ export const metadata = {
`Data and Infrastructure Layer`
- This is the foundation of the system, providing the necessary infrastructure to support the application.
+ This is the first step for a local or deployed environment.
@@ -148,7 +138,7 @@ export const metadata = {
`Core Service Layer`
- This is the main application boundary and the orchestrator of the system.
+ This is the primary application boundary described in the docs.
@@ -159,7 +149,7 @@ export const metadata = {
`AI/ML Service Layer`
- Required for AI/ML heavy tasks such as data processing, model training and other operations.
+ Required for AI-specific setup and integration work.
@@ -170,7 +160,7 @@ export const metadata = {
`Client Applications Layer`
- Use a client app once the Core and/or AI/ML Service layer are available and reachable.
+ Use the docs app once you know which service page you need next.
diff --git a/src/app/globals.css b/src/app/globals.css
index 54ebb55..930f08c 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -50,6 +50,8 @@
:root {
--radius: 0.625rem;
+ --font-geist-sans: ui-sans-serif, system-ui, sans-serif;
+ --font-geist-mono: ui-monospace, SFMono-Regular, monospace;
--card: oklch(1 0 0);
--card-foreground: oklch(0.141 0.005 285.823);
--popover: oklch(1 0 0);
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 2517679..7fa2d72 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,18 +1,7 @@
import type { Metadata } from 'next'
-import { Geist, Geist_Mono } from 'next/font/google'
import './globals.css'
import { ThemeProvider } from '@/components/theme-provider'
-const geistSans = Geist({
- variable: '--font-geist-sans',
- subsets: ['latin'],
-})
-
-const geistMono = Geist_Mono({
- variable: '--font-geist-mono',
- subsets: ['latin'],
-})
-
export const metadata: Metadata = {
title: 'NeuroLab Documentation',
description: 'Comprehensive documentation for NeuroLab EEG & Voice Mental State Analysis Platform',
@@ -25,9 +14,7 @@ export default function RootLayout({
}>) {
return (
-
+
{children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index be8d7e5..894a9ef 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -17,8 +17,8 @@ export default function Home() {
NeuroLab Documentation
- Comprehensive documentation for the EEG & Voice Mental State Analysis Platform.
- Build powerful neurotechnology applications with multimodal AI.
+ Documentation for the NeuroLab platform and the pages in this repository.
+ Start with the overview, then move into setup and API reference pages.
@@ -43,9 +43,9 @@ export default function Home() {
-
EEG Analysis
+
EEG Processing
- Real-time brain signal processing with advanced ML models
+ Signal processing concepts and feature extraction basics
@@ -54,9 +54,9 @@ export default function Home() {
-
Voice Emotion
+
Mental States
- Audio emotion detection mapped to mental states
+ The state taxonomy used throughout the docs
@@ -65,9 +65,9 @@ export default function Home() {
-
Multimodal
+
Setup
- Combine EEG and voice for comprehensive analysis
+ Installation and deployment guidance
@@ -76,9 +76,9 @@ export default function Home() {
-
Real-time
+
API Reference
- Stream and analyze data in real-time via WebSocket
+ Backend and AI service endpoints
@@ -113,19 +113,19 @@ export default function Home() {
-
+
-
AI API
+
API Overview
- Explore the AI service endpoints
+ See the backend and AI service reference pages
-
+
-
Real-time Streaming
+
EEG Concepts
- Stream EEG data in real-time
+ Learn the processing pipeline behind the mental state model