A comprehensive operational capability optimisation system designed for high-risk industries (mining, minerals, petrochemicals, defence).
- 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
- Node.js 18+
- PostgreSQL database
- Geoapify API key (free tier available)
- Clone the repository:
git clone <repository-url>
cd CapOpt-Platform- Install dependencies:
npm install- Set up environment variables:
Create a
.env.localfile 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- Set up the database:
# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate dev
# Seed the database
npm run db:seed- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
The application uses Geoapify API for location validation and autocomplete. To set this up:
- Visit https://www.geoapify.com/
- Sign up for a free account
- Get your API key from the dashboard
- Add the API key to your
.env.localfile:NEXT_PUBLIC_GEOAPIFY_API_KEY=your_actual_api_key_here
- 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
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:seed- Seed the databasenpm run db:generate- Generate Prisma clientnpm run db:migrate- Run database migrations
This project uses a comprehensive AI-aware testing strategy. See docs/testing-strategy.md for full details.
# 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- 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)
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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is proprietary software. All rights reserved.