Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
DudsPublic archive

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CapOpt Platform

A comprehensive operational capability optimisation system designed for high-risk industries (mining, minerals, petrochemicals, defence).

Features

  • Business Model Canvas Management: Hierarchical canvas creation and management
  • Location Validation: Real-time city, state, country validation using Geoapify API
  • Strategic Planning: Multi-step business information collection
  • Risk Management: Critical Controls Theory integration
  • Modern UI: Built with Next.js 15+, React 18+, TypeScript, and Tailwind CSS

Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Geoapify API key (free tier available)

Installation

  1. Clone the repository:
git clone <repository-url>
cd CapOpt-Platform
  1. Install dependencies:
npm install
  1. Set up environment variables: Create a .env.local file in the root directory:
# Geoapify API Configuration
# Get your free API key from: https://www.geoapify.com/
NEXT_PUBLIC_GEOAPIFY_API_KEY=your_geoapify_api_key_here

# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/capopt_platform"

# Authentication (if using)
NEXTAUTH_SECRET=your_nextauth_secret_here
NEXTAUTH_URL=http://localhost:3000
  1. Set up the database:
# Generate Prisma client
npx prisma generate

# Run migrations
npx prisma migrate dev

# Seed the database
npm run db:seed
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Geoapify API Setup

The application uses Geoapify API for location validation and autocomplete. To set this up:

  1. Visit https://www.geoapify.com/
  2. Sign up for a free account
  3. Get your API key from the dashboard
  4. Add the API key to your .env.local file:
    NEXT_PUBLIC_GEOAPIFY_API_KEY=your_actual_api_key_here
    

Features Provided by Geoapify Integration

  • Location Autocomplete: Real-time suggestions as you type
  • City, State, Country Validation: Automatic parsing and validation
  • Geocoding: Convert addresses to coordinates
  • Address Formatting: Standardized address formats
  • Error Handling: Graceful fallback when API is unavailable

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run db:seed - Seed the database
  • npm run db:generate - Generate Prisma client
  • npm run db:migrate - Run database migrations

Testing

This project uses a comprehensive AI-aware testing strategy. See docs/testing-strategy.md for full details.

Quick Test Commands

# Run all tests
npm run test

# Run specific test types
npm run test:unit              # Unit tests
npm run test:integration       # Integration tests  
npm run test:e2e               # E2E tests

# Validate test IDs and schema
npm run lint:test-ids          # Check test ID consistency
npm run validate:schema        # Validate schema alignment

# Generate coverage report
npm run test:coverage

Technology Stack

  • Frontend: Next.js 15+, React 18+, TypeScript, Tailwind CSS
  • Backend: Node.js, Express.js, Prisma ORM
  • Database: PostgreSQL
  • UI Components: shadcn/ui
  • Location Services: Geoapify API
  • Authentication: NextAuth.js (optional)

Project Structure

CapOpt-Platform/
├── app/                    # Next.js app directory
├── components/             # React components
│   ├── ui/                # shadcn/ui components
│   ├── business-canvas/   # Business canvas components
│   └── navigation/        # Navigation components
├── hooks/                 # Custom React hooks
├── lib/                   # Utility libraries
├── prisma/                # Database schema and migrations
├── docs/                  # Documentation
└── public/                # Static assets

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is proprietary software. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages