Real-time outage management, SLA enforcement, automated blockchain payments, and analytics.
Frontend application for the ApexChain network operations intelligence system.
This repository is the user-facing layer in the 3-repo system:
apexchainx-frontend→ frontend (this repo)apexchainx-backend→ backend and integration layerapexchainx-contracts→ Soroban smart contracts
User → Frontend → Backend → Smart Contracts → Backend → Frontend
- The frontend does not talk to contracts directly
- All contract interaction must go through
apexchainx-backend
- Overview
- Current App Surface
- Backend Integration
- Local Setup
- Project Structure
- Stabilized Baseline
- Current Limitations
- Contributing Notes
- Related Repositories
apexchainx-frontend is a Next.js frontend for viewing outages, reviewing SLA outcomes, exposing payment and configuration screens, and managing webhooks and bulk data imports.
| Technology | Purpose |
|---|---|
| Next.js 16 | React framework with App Router |
| React 19 | UI component library |
| TypeScript 5 | Type-safe development |
| TanStack React Query | Server state management and caching |
| TanStack Table | Data table with sorting, filtering, pagination |
| Axios | HTTP client for API communication |
| Tailwind CSS 4 | Utility-first CSS framework |
| Radix UI | Unstyled, accessible UI primitives |
| Vitest | Unit and integration testing |
Active App Router routes live under src/app:
| Route | Description |
|---|---|
/ |
SLA dashboard with KPIs, trends, and analytics |
/outages |
Outages list with advanced filtering and export |
/outages/new |
Create new outage with validation |
/outages/[id] |
Outage details, timeline, resolution, and editing |
/payments |
Payment history and transaction tracking |
/config |
SLA configuration management |
/setting |
User and application settings |
/webhooks |
Webhook configuration and event management |
/bulk-import |
Bulk outage import with dry-run and history |
/login |
User authentication |
/register |
New user registration |
The shared shell and providers live in:
src/app/layout.tsx— Root layout with providerssrc/components/Navigation.tsx— Main navigation shellsrc/providers/react-query.tsx— TanStack Query providersrc/providers/session.tsx— Authentication and session management
Feature modules are organized under src/features/ for domain-specific UI and hooks.
The frontend uses the backend API client in src/lib/api.ts.
Base URL: http://localhost:8000/api/v1/
Local development expects the backend running on port 8000.
| Module | Purpose |
|---|---|
src/services/outages.ts |
Outage CRUD operations |
src/services/paymentService.ts |
Payment processing and history |
src/services/dashboardService.ts |
Dashboard analytics and KPIs |
src/services/exportService.ts |
Data export (CSV, JSON) |
src/services/bulkImportService.ts |
Bulk outage import and dry-run |
src/services/sla.ts |
SLA status and configuration |
src/services/webhookService.ts |
Webhook management |
- Node.js 20+ (LTS recommended)
- npm 9+
- Running backend from
apexchainx-backend
# Clone the repository
git clone https://github.com/ApexChainx/ApexChainx-Frontend.git
cd ApexChainx-Frontend
# Install dependencies
npm install
# Start development server
npm run devThe application will be available at http://localhost:3000.
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Create optimized production build |
npm run start |
Start production server |
npm run lint |
Run ESLint for code quality |
npm run test |
Run Vitest test suite |
For the frontend to function meaningfully, start the backend as well:
- Run
apexchainx-backendon port8000 - Ensure the backend API is reachable at
http://localhost:8000 - Start this frontend on
http://localhost:3000
Note: Without the backend, the app shell will load, but API-backed views such as outages, exports, bulk import, payments, and analytics will not have live data.
apexchainx-frontend/
├── src/
│ ├── app/ # Next.js App Router pages and layouts
│ ├── components/ # Shared UI components and dashboard widgets
│ │ ├── dashboard/ # SLA dashboard views and charts
│ │ ├── outages/ # Outage-specific UI components
│ │ ├── payments/ # Payment views and drawers
│ │ ├── bulk-import/ # Bulk import views
│ │ ├── shared/ # Shared error states and utilities
│ │ └── ui/ # Low-level UI primitives (button, table, card, etc.)
│ ├── features/ # Feature-specific modules
│ │ └── outages/ # Outage hooks, components, and helpers
│ ├── hooks/ # Shared React hooks (session, SLA config, focus trap)
│ ├── lib/ # API client, auth helpers, URL utils, environment config
│ │ ├── config/ # Environment configuration
│ │ └── auth/ # Authentication redirect helpers
│ ├── providers/ # React context providers
│ ├── services/ # Backend-facing service modules
│ └── types/ # Shared TypeScript type definitions
├── docs/ # Project documentation
├── tests/ # Test files
├── vitest.config.ts # Vitest test configuration
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Project metadata and dependencies
As of the latest stabilization pass:
- ✅
npm run buildpasses without errors - ✅
npm run lintpasses (one non-blocking TanStack Table warning) - ✅ All local UI primitives restored and functional
- ✅ Stale
import.meta.envusage removed from active service modules - ✅ Outage pages aligned with backend response shapes
- ✅ Test suite passing with Vitest
This repository is actively being developed. Current areas of focus:
/payments— transitioning from placeholder to full-featured payment views/setting— expanding settings capabilities/— enhancing the SLA dashboard with richer analytics- Codebase consolidation: merging older page-style screens into the App Router pattern
- API alignment: some frontend flows depend on backend endpoints still being stabilized in
apexchainx-backend
When making frontend changes:
- Preserve the system rule: Frontend calls Backend, never Contracts directly
- Prefer App Router: Update the App Router implementation first
- API alignment: Keep API shapes synchronized with
apexchainx-backend - Integration boundary: Treat
src/services/andsrc/lib/api.tsas the boundary - Type safety: No
astype assertions on raw API responses; use typed generics
See CONTRIBUTING.md for detailed contribution guidelines.
| Repository | Description |
|---|---|
apexchainx-backend |
Backend API and integration layer |
apexchainx-contracts |
Soroban smart contracts for SLA enforcement |