A Next.js application that provides the user interface for the Morpheus Inference API, including user authentication via AWS Cognito, API key management, automation settings, and an interactive chat interface.
- 🔐 AWS Cognito Authentication: Secure OAuth2/OpenID Connect authentication
- 🔑 API Key Management: Create, manage, and delete API keys
- ⚙️ Automation Settings: Configure automated session management
- 💬 Interactive Chat: Real-time chat interface with model selection and history
- 📊 Analytics Integration: Google Analytics 4 and Google Tag Manager support
- 🎨 Modern UI: Beautiful, responsive design with Tailwind CSS
- Node.js: >= 20.0.0 (specified in package.json engines)
- npm: Latest version recommended
- AWS Cognito: Access to the Morpheus Cognito User Pool credentials
git clone https://github.com/morpheusais/morpheus-marketplace-app.git
cd morpheus-marketplace-appnpm installCopy the example environment file and configure it for your local environment:
cp env.example .env.localEdit .env.local with your configuration. The env.example file is pre-configured with production environment values:
NEXT_PUBLIC_API_BASE_URL=https://api.mor.org
NEXT_PUBLIC_COGNITO_REGION=us-east-2
NEXT_PUBLIC_COGNITO_USER_POOL_CLIENT_ID=gllbg66ej476tsaf2ibfjc7g8
NEXT_PUBLIC_COGNITO_DOMAIN=auth.mor.org
NEXT_PUBLIC_GA_ID=
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_ALLOWED_MODEL_TYPES=LLM
NEXT_PUBLIC_DEFAULT_MODEL=LMR-Hermes-3-Llama-3.1-8B💡 Tip: Analytics tracking is disabled by default (GA_ID and GTM_ID are empty).
npm run devOpen http://localhost:3000 in your browser to see the application.
npm run build
npm startFor detailed developer documentation, see:
- Local Developer Guide - Complete setup and contribution guidelines
morpheus-marketplace-app/
├── src/
│ ├── app/ # Next.js app directory (routes)
│ │ ├── admin/ # Admin dashboard for API key management
│ │ ├── account/ # User account settings
│ │ ├── api-keys/ # API key management page
│ │ ├── auth/ # Authentication callbacks
│ │ ├── chat/ # Interactive chat interface
│ │ ├── confirm-registration/ # Email verification
│ │ ├── login-direct/ # Direct login page
│ │ ├── register/ # Registration page
│ │ ├── signin/ # Sign in page
│ │ ├── signup/ # Sign up page
│ │ ├── test/ # Test page
│ │ └── ... # Root layout, globals, etc.
│ ├── components/ # Reusable React components
│ │ ├── ai-elements/ # AI chat components (messages, prompts, etc.)
│ │ ├── auth/ # Authentication components
│ │ ├── providers/ # Context providers (GTM, etc.)
│ │ ├── ui/ # shadcn/ui components
│ │ └── ... # Other shared components
│ ├── lib/ # Utility libraries
│ │ ├── api/ # API service layer
│ │ ├── auth/ # Cognito authentication logic
│ │ ├── hooks/ # Custom React hooks
│ │ ├── types/ # TypeScript type definitions
│ │ └── utils/ # Helper functions
│ └── types/ # Global type definitions
├── docs/ # Developer documentation
├── public/ # Static assets
├── amplify.yml # AWS Amplify build configuration
├── components.json # shadcn/ui configuration
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── ... # Other config files
npm run dev- Start development server with Turbopacknpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
This application is deployed using AWS Amplify with automatic deployments configured for:
- Development:
https://app.dev.mor.org(fromdevbranch) - Production:
https://app.mor.org(frommainbranch)
- Feature branches → PR to
dev(1 peer review required) dev→ Automatically deploys tohttps://app.dev.mor.orgdev→ PR tomain(2 peer reviews required)main→ Automatically deploys tohttps://app.mor.org
- Measurement ID:
G-RQ88CWRH3X - Real-time user analytics and behavior tracking
- Container ID:
GTM-5SNC6HZ5 - Centralized tag management and advanced configurations
- User authentication (login, signup, logout)
- API key management (create, delete, set default)
- Automation settings changes
- Chat message interactions
- Page views and navigation
This application uses AWS Cognito for authentication with:
- Direct sign-in/sign-up flows
- Password reset functionality
- OAuth2/OpenID Connect tokens
- Secure session management
Authentication is configured through environment variables (see env.example).
Please see the Local Developer Guide for contribution guidelines and development workflow.
This project is part of the Morpheus AI ecosystem.
- Morpheus API Documentation
- AWS Amplify Documentation
- Next.js Documentation
- AWS Cognito Documentation
For issues, questions, or contributions:
- Open an issue on GitHub
- Join the Morpheus community on Discord
- Visit mor.org for more information