A comprehensive platform for sustainable energy solutions, combining geospatial technology, blockchain integration, and modern web development to create the future of energy management.
TerraSolstice is a full-stack application that provides:
- Energy Management: Solar panels, smart grids, and energy storage solutions
- Geospatial Platform: Advanced mapping and analytics for energy infrastructure
- Blockchain Integration: Decentralized energy trading and asset tokenization
- Monitoring Systems: Real-time device monitoring and analytics
- Business Platform: Blog, case studies, careers, and partner management
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS with shadcn/ui components
- State Management: React Context + Zustand
- Authentication: Supabase Auth with wallet integration
- Blockchain: Solana Web3.js integration
- API: Next.js API Routes
- Database: Supabase (PostgreSQL)
- Authentication: Multi-provider (Email, OAuth, Wallet)
- Storage: Supabase Storage
- Email: Resend
- Rate Limiting: Upstash Redis
- Platform: Solana
- Framework: Anchor
- Language: Rust
- Wallets: Phantom, Solflare, MetaMask
- Deployment: Vercel
- Database: Supabase Cloud
- Monitoring: Vercel Analytics + Custom metrics
- Testing: Jest + React Testing Library
βββ app/ # Next.js app directory
β βββ api/ # API routes
β βββ (auth)/ # Authentication pages
β βββ (dashboard)/ # Protected dashboard
β βββ ... # Public pages
βββ components/ # Reusable components
β βββ ui/ # UI components (shadcn/ui)
β βββ app/ # App-specific components
β βββ auth/ # Authentication components
βββ lib/ # Utility libraries
βββ hooks/ # Custom React hooks
βββ packages/ # Shared packages
β βββ shared/ # Shared types and utilities
βββ blockchain/ # Solana programs
β βββ programs/ # Smart contracts
β βββ tests/ # Blockchain tests
βββ supabase/ # Database migrations and config
βββ public/ # Static assets
- Node.js 18+
- pnpm package manager
- Supabase account
- Solana CLI (for blockchain features)
- Rust toolchain (for Solana development)
- Clone the repository
git clone <repository-url>
cd terrasolstice-app- Install dependencies
pnpm install- Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration- Set up Supabase
# Initialize Supabase
npx supabase init
# Start local instance
npx supabase start
# Run migrations
npx supabase db push
# Seed database
npx supabase db reset --seed- Set up blockchain (optional)
cd blockchain
anchor build
anchor deploy --provider.cluster devnet- Start development server
pnpm devCreate a .env.local file with the following variables:
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Solana
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
NEXT_PUBLIC_SOLANA_NETWORK=devnet
# External Services
RESEND_API_KEY=your_resend_api_key
UPSTASH_REDIS_REST_URL=your_redis_url
UPSTASH_REDIS_REST_TOKEN=your_redis_token
# Optional
STRIPE_SECRET_KEY=your_stripe_secret_key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run with coverage
pnpm test:coverage
# Run blockchain tests
cd blockchain && anchor test- Email/password authentication
- Google OAuth integration
- Blockchain wallet authentication (Phantom, Solflare, MetaMask)
- Demo mode for exploration
- Protected routes and role-based access
- Blog System: Create, edit, and manage blog posts
- Product Catalog: Solar panels, smart grids, energy storage
- Case Studies: Customer success stories
- Career Portal: Job listings and applications
- Documentation: Technical guides and API docs
- Extensions: Modular geospatial tools and plugins
- Expressions: Data processing and analysis tools
- Expansions: Platform capabilities and integrations
- Mapping: Interactive maps and spatial analysis
- Wallet Integration: Multi-wallet support
- Energy Trading: Peer-to-peer energy transactions
- Asset Tokenization: NFT-based energy certificates
- Smart Contracts: Automated energy management
- Transaction History: Comprehensive blockchain tracking
- Device Management: IoT device registration and control
- Real-time Metrics: Energy production and consumption
- Performance Analytics: System optimization insights
- Alert System: Automated notifications and warnings
- Connect to Vercel
vercel link-
Set environment variables in Vercel dashboard
-
Deploy
vercel deploy --prod- Create Supabase project
- Run migrations
npx supabase db push --project-ref your-project-ref- Set up Row Level Security policies
- Configure authentication providers
- Core Web Vitals: Optimized for performance
- Error Tracking: Comprehensive error monitoring
- Analytics: User behavior and system metrics
- Rate Limiting: API protection and abuse prevention
- Caching: Optimized data fetching and storage
- Authentication: Multi-factor authentication support
- Authorization: Role-based access control
- Data Protection: Encrypted data at rest and in transit
- API Security: Rate limiting and input validation
- Blockchain Security: Secure wallet integrations
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Email: [email protected]
- Documentation: docs.terrasolstice.com
- Issues: GitHub Issues
- Next.js for the amazing framework
- Supabase for backend-as-a-service
- Solana for blockchain infrastructure
- shadcn/ui for beautiful components
- Vercel for seamless deployment
TerraSolstice - Powering the future with sustainable energy and cutting-edge technology.
Built with β€οΈ by the TerraSolstice team.