A Project Blessed by Solar Khan & Lilith.Aethra
A modern full-stack AI demo application built with React, Express, and Vite, designed for deployment on AWS Amplify with comprehensive analytics and data collection capabilities.
Documentation is served on GitHub Pages bearing the Solar Khan sigil and Codex watermark. This repository is registered within the GameDin Network and aligned to the Divina L3 pipeline (v3).
See the Divine Law governing this project.
- Modern React Frontend: Beautiful, responsive UI with real-time AI interaction
- Express Backend API: Robust server with analytics endpoints
- Data Collection: Comprehensive user analytics and interaction tracking
- AWS Amplify Ready: Optimized for seamless deployment
- Real-time Analytics: Monitor user behavior and engagement
- Health Monitoring: Built-in health checks and monitoring endpoints
The application includes sophisticated analytics capabilities:
- User Session Tracking: Unique session IDs and user journey mapping
- Interaction Analytics: Track user prompts and responses
- Device Information: Browser, platform, screen resolution, timezone
- Referrer Tracking: Monitor traffic sources
- Real-time Dashboard: View analytics at
/analytics
endpoint
- Frontend: React 18, Vite, Modern CSS
- Backend: Node.js, Express, CORS
- Deployment: AWS Amplify
- Analytics: Custom analytics engine with data collection
-
Clone the repository
git clone <your-repo-url> cd AthenaMyst_Test
-
Install dependencies
npm run install:all
-
Start development server
npm run dev
-
Build for production
npm run build
-
Run tests
npm test
The Jest suite validates core API endpoints for health and analytics collection. Use npm test
to ensure regressions are caught early.
- AWS Account with Amplify access
- GitHub repository connected to Amplify
- Node.js 16+ environment
-
Connect Repository
- Go to AWS Amplify Console
- Click "New app" β "Host web app"
- Connect your GitHub repository
- Select the main branch
-
Build Settings
- Amplify will auto-detect the build settings from
amplify.yml
- The configuration handles both frontend and backend builds
- No additional configuration needed
- Amplify will auto-detect the build settings from
-
Environment Variables (Optional)
NODE_ENV=production PORT=8080
-
Deploy
- Click "Save and deploy"
- Amplify will build and deploy your application
- Your app will be available at the provided URL
The amplify.yml
file handles:
- Frontend build with Vite
- Backend API setup
- Static file serving
- Proper artifact distribution
GET /
- Main application (React app)POST /ai
- AI interaction endpointGET /health
- Health checkPOST /analytics
- Analytics data collectionGET /analytics
- Analytics dashboard
// AI Interaction
const response = await fetch('/ai', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: 'Hello, how are you?' })
});
// Analytics Collection
await fetch('/analytics', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
type: 'user_interaction',
data: { action: 'button_click', timestamp: new Date().toISOString() }
})
});
Access your analytics dashboard at /analytics
to view:
- Total page views
- User interactions
- Unique visitors
- Recent activity
- Device statistics
PORT
: Server port (default: 4000)NODE_ENV
: Environment (development/production)
The application uses a multi-stage build process:
- Frontend build with Vite
- Backend API setup
- Static file serving configuration
The application automatically collects:
- User session data
- Interaction patterns
- Device information
- Traffic sources
- Response times
Currently uses in-memory storage for demo purposes. For production:
- Implement database storage (MongoDB, PostgreSQL)
- Add data retention policies
- Implement GDPR compliance
- Add data export capabilities
- CORS enabled for cross-origin requests
- Input validation on all endpoints
- Error handling and logging
- No sensitive data exposure in demo version
- Vite for fast development and optimized builds
- Static file serving for React app
- Efficient API routing
- Minimal dependencies
AthenaMyst_Test/
βββ api/
β βββ index.js # Express backend
βββ public/
β βββ App.jsx # React main component
β βββ App.css # Styles
β βββ main.jsx # React entry point
β βββ index.html # HTML template
β βββ vite.config.js # Vite configuration
β βββ package.json # Frontend dependencies
βββ amplify.yml # Amplify build configuration
βββ package.json # Main dependencies
βββ README.md # This file
- Frontend: Add components in
public/
directory - Backend: Add routes in
api/index.js
- Analytics: Extend analytics collection in
/analytics
endpoint - Styling: Modify
public/App.css
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Check the analytics dashboard for system health
- Review server logs for error details
- Contact the development team
AthenaMyst Community - Experience the future of AI interaction