Skip to content

ElementAstro/cobalt-mobile

Repository files navigation

Cobalt Mobile - Advanced Astrophotography Control Platform

A comprehensive, mobile-first astrophotography equipment control and automation platform built with Next.js, React, TypeScript, and advanced simulation capabilities.

πŸš€ Features

Core Functionality

  • Real-time Equipment Control: Camera, mount, focuser, and filter wheel management
  • Advanced Sequencing: Intelligent sequence planning with AI-powered suggestions
  • Environmental Monitoring: Live weather and seeing condition tracking
  • Equipment Profiles: Save and manage multiple equipment configurations
  • Real-time Monitoring: Live performance metrics and alerts
  • Enhanced Simulation: Realistic equipment behavior and environmental effects

User Interface

  • Responsive Design: Optimized for mobile, tablet, and desktop
  • Enhanced Navigation: Intuitive bottom navigation with status indicators
  • Loading States: Smooth transitions and performance feedback
  • Error Handling: Comprehensive error boundaries and recovery
  • Dark/Light Mode: Automatic theme switching
  • Performance Monitoring: Built-in performance tracking and optimization

Advanced Features

  • Equipment Profiles: Manage multiple telescope/camera setups
  • Sequence Planner: AI-assisted imaging session planning
  • Real-time Monitor: Live equipment and environmental monitoring
  • Data Visualization: Charts and graphs for performance tracking
  • Export/Import: Save and share configurations and sequences

πŸ›  Technology Stack

  • Framework: Next.js 14 with App Router
  • Language: TypeScript
  • UI Components: Custom components with Tailwind CSS
  • State Management: Zustand
  • Animations: Framer Motion
  • Icons: Lucide React
  • Styling: Tailwind CSS with CSS Variables

πŸ“± Getting Started

Prerequisites

  • Node.js 18+
  • npm, yarn, pnpm, or bun

Installation

  1. Clone the repository:
git clone https://github.com/your-username/cobalt-mobile.git
cd cobalt-mobile
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open http://localhost:3000 in your browser

Building for Production

npm run build
npm run start

πŸ“ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout with error boundary
β”‚   └── page.tsx           # Main application component
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ enhanced-navigation.tsx
β”‚   β”‚   β”œβ”€β”€ loading-states.tsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ enhanced-dashboard.tsx
β”‚   β”œβ”€β”€ equipment-profiles.tsx
β”‚   β”œβ”€β”€ real-time-monitor.tsx
β”‚   β”œβ”€β”€ advanced-sequence-planner.tsx
β”‚   β”œβ”€β”€ error-boundary.tsx
β”‚   └── ...
β”œβ”€β”€ hooks/                # Custom React hooks
β”‚   β”œβ”€β”€ use-performance.ts
β”‚   └── use-mobile.tsx
β”œβ”€β”€ lib/                  # Utilities and services
β”‚   β”œβ”€β”€ simulation-engine.ts
β”‚   β”œβ”€β”€ store.ts
β”‚   └── utils.ts
└── ...

🎯 Key Components

Enhanced Simulation Engine (src/lib/simulation-engine.ts)

  • Realistic equipment behavior simulation
  • Environmental condition modeling
  • Error condition simulation
  • Performance metrics tracking

Equipment Profiles (src/components/equipment-profiles.tsx)

  • Save multiple equipment configurations
  • Calculate field of view and image scale
  • Import/export profile data
  • Equipment compatibility checking

Real-time Monitor (src/components/real-time-monitor.tsx)

  • Live environmental data tracking
  • Equipment health monitoring
  • Alert system with notifications
  • Performance metrics visualization

Advanced Sequence Planner (src/components/advanced-sequence-planner.tsx)

  • AI-powered sequence optimization
  • Target database with recommendations
  • Weather and moon phase considerations
  • Intelligent exposure planning

Performance Monitoring (src/hooks/use-performance.ts)

  • Component render time tracking
  • Memory usage monitoring
  • Frame rate measurement
  • Async operation timing

πŸ”§ Configuration

Environment Variables

Create a .env.local file in the root directory:

# Development settings
NODE_ENV=development
NEXT_PUBLIC_APP_VERSION=1.0.0

# Performance monitoring
NEXT_PUBLIC_ENABLE_PERFORMANCE_MONITORING=true

# Simulation settings
NEXT_PUBLIC_SIMULATION_REALISM=realistic
NEXT_PUBLIC_ERROR_RATE=0.05

Customization

The application can be customized through:

  • Theme Configuration: Modify src/app/globals.css for custom themes
  • Simulation Parameters: Adjust src/lib/simulation-engine.ts for different behaviors
  • Equipment Profiles: Add custom equipment in src/components/equipment-profiles.tsx
  • UI Components: Extend components in src/components/ui/

πŸ§ͺ Testing

Run the test suite:

npm test
# or
yarn test
# or
pnpm test

Test Coverage

  • Unit tests for utility functions
  • Component integration tests
  • Simulation engine validation
  • Performance benchmarks

πŸ“Š Performance

The application includes built-in performance monitoring:

  • Render Performance: Component render time tracking
  • Memory Usage: JavaScript heap monitoring
  • Frame Rate: Real-time FPS measurement
  • Network Performance: API call timing
  • User Experience: Loading state optimization

Performance Features

  • Debounced user interactions
  • Lazy loading for heavy components
  • Optimized re-renders with React.memo
  • Efficient state management with Zustand
  • Progressive loading with skeleton states

πŸš€ Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Deploy automatically on push

Docker

# Build the Docker image
docker build -t cobalt-mobile .

# Run the container
docker run -p 3000:3000 cobalt-mobile

Manual Deployment

npm run build
npm run start

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Use the existing component patterns
  • Add tests for new features
  • Update documentation
  • Ensure responsive design

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Next.js team for the excellent framework
  • Tailwind CSS for the utility-first CSS framework
  • Framer Motion for smooth animations
  • Lucide for beautiful icons
  • The astrophotography community for inspiration

πŸ“ž Support

For support, please open an issue on GitHub or contact the development team.


Built with ❀️ for the astrophotography community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages