SadhanaBoard is a comprehensive spiritual productivity and mindfulness application designed to help users track their spiritual practices, set intentions, and cultivate deeper awareness through gamified elements and cosmic themes.
- Features
- Technology Stack
- Theme System
- Project Structure
- Development Setup
- Environment Variables
- Database Setup
- Running the Application
- Building for Production
- API Documentation
- Admin Panel
- Scripts
- Deployment
- Contributing
- License
- Track spiritual practices and habits
- Set intentions and goals
- Cosmic-themed UI with multiple spiritual themes
- Progress tracking and insights
- Community features and social sharing
- Meditation and mindfulness tools
- Book reading progress tracking
- Group sadhanas and community participation
- Personal profile management
- Settings customization
- Analytics and reporting
- Real-time notifications
- Gamification elements
- Deity Interfaces: Connect with higher self through deity representations
- Chakra Visualization: Interactive chakra energy display
- Sacred Geometry: Sri Yantra and other yantra visualizations
- Shadow Work: Monitor shadow aspects and light integration
- Sound System: Divine sounds and ambient background audio
- Meditation Guidance: AI-powered spiritual guidance
- Framework: React with TypeScript
- Build Tool: Vite
- State Management: React Context API + Custom Hooks
- UI Components: Radix UI + shadcn-ui
- Styling: Tailwind CSS
- Routing: React Router
- Data Fetching: React Query (@tanstack/react-query)
- Forms: React Hook Form + Zod
- Animations: Framer Motion, Anime.js, GSAP
- 3D Graphics: react-three/fiber + drei
- Icons: Lucide React
- Framework: Node.js + Express
- Database: PostgreSQL
- Authentication: JWT-based
- File Storage: Local file system
- Real-time: Socket.IO
- API Documentation: RESTful endpoints
- Language: TypeScript
- Package Manager: npm
- Linting: ESLint
- Testing: Jest (planned for future implementation)
SadhanaBoard includes a sophisticated theme system with 10+ spiritual themes:
- Default - Clean, minimal theme
- Shiva - Cosmic destroyer theme
- Mahakali - Powerful goddess theme with animated 3D background
- Mystery - Enigmatic dark theme
- Earth - Grounding nature theme
- Water - Flowing aquatic theme
- Fire - Energetic flame theme
- Bhairava - Fierce protector theme
- Serenity - Peaceful light theme
- Ganesha - Remover of obstacles theme
The Mahakali theme features a dynamic 3D animated background using Three.js. It requires specific assets to function properly:
mahakali-yantra.png- The central yantra textureSkull and Bone Turnaround.gif- Theme icon
Theme assets are managed through a series of npm scripts:
# Ensure all theme assets are in place
npm run themes:ensure-assets
# Generate theme manifest
npm run themes:generate
# Copy theme icons from root icons/ directory
npm run themes:copy-icons
# Move and optimize assets
npm run assets:move
# Run all setup scripts (used in dev and build)
npm run dev:setup-
Missing public/icons directory: The
themes:ensure-assetsscript will create this directory if missing. -
Mahakali theme background not rendering:
- Check that
public/icons/mahakali-yantra.pngexists and is a valid image file - Run
npm run dev:setupto ensure assets are properly copied - The system will use a procedural fallback if the texture fails to load
- Check that
-
Theme icons not loading:
- Run
npm run themes:copy-iconsto copy icons from the rooticons/directory - Check that the source icons exist in the
icons/directory
- Run
-
Theme switching issues:
- Verify that all themes are properly registered in
src/themes/index.ts - Check browser console for theme-related errors
- Verify that all themes are properly registered in
saadhanaboard/
├── backend/
│ ├── config/ # Database configuration
│ ├── controllers/ # Request handlers
│ ├── middleware/ # Express middleware
│ ├── models/ # Data models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── utils/ # Utility functions
│ ├── package.json # Backend dependencies
│ └── server.js # Entry point
├── public/ # Static assets
├── src/
│ ├── components/ # React components
│ │ ├── deity/ # Deity-related components
│ │ ├── library/ # Library components
│ │ ├── sadhana/ # Sadhana components
│ │ ├── settings/ # Settings components
│ │ └── ui/ # Shared UI components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Core utilities and context
│ ├── pages/ # Page components
│ ├── services/ # API service layer
│ ├── styles/ # CSS and styling files
│ ├── themes/ # Theme configurations
│ ├── types/ # TypeScript types
│ └── utils/ # Helper functions
├── supabase/ # Database migrations (reference)
├── package.json # Frontend dependencies
└── vite.config.ts # Vite configuration
- Node.js (v18+)
- PostgreSQL database
- npm package manager
-
Clone Repository
git clone <repository-url> cd saadhanaboard
-
Install Dependencies
# Install frontend dependencies npm install # Install backend dependencies npm run backend:install
Create a .env file in the root directory:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
# API Configuration
VITE_API_BASE_URL=http://localhost:3004/api
# Admin Configuration
ADMIN_USERNAME=admin
ADMIN_PASSWORD=password
# Development Configuration
VITE_DEV_MODE=trueCreate a .env file in the backend/ directory:
# Database Configuration
DB_USER=postgres
DB_HOST=localhost
DB_NAME=saadhanaboard
DB_PASSWORD=your_password_here
DB_PORT=5432
# JWT Configuration
JWT_SECRET=your_jwt_secret_here
# Server Configuration
PORT=3004
# CORS Configuration
CORS_ORIGIN=http://localhost:5173-
Create PostgreSQL Database
CREATE DATABASE saadhanaboard;
-
Run Database Initialization
cd backend node utils/initDb.js
Start both frontend and backend servers:
-
Start Backend Server
npm run backend:dev
Runs on http://localhost:3004
-
Start Frontend Development Server
npm run dev
Runs on http://localhost:5173
After starting the backend, set up the admin account:
npm run backend:setupnpm run buildThis will run all asset preparation scripts and build the application.
To preview the production build:
npm run previewThe backend API follows RESTful principles and includes endpoints for:
- Authentication:
/api/auth/* - Users:
/api/users/* - Profiles:
/api/profiles/* - Sadhanas:
/api/sadhanas/* - Books:
/api/books/* - Groups:
/api/groups/* - Settings:
/api/settings/*
Detailed API documentation is available in the source code comments.
The application includes an admin panel for managing:
- User accounts
- Content moderation
- System settings
- Analytics and reports
Access the admin panel at /admin after setting up admin credentials.
# Create demo admin account
npm run admin:create-demo
# Setup admin account
npm run admin:setup
# Create default admin
npm run admin:create-default
# Debug admin login
npm run debug:admin
# Fix admin setup
npm run fix:adminnpm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run test- Run tests
npm run themes:ensure-assets- Ensure theme assets existnpm run themes:generate- Generate theme manifestnpm run themes:copy-icons- Copy theme iconsnpm run assets:move- Move and optimize assetsnpm run dev:setup- Run all setup scripts
npm run backend:dev- Start backend development servernpm run backend:install- Install backend dependencies
-
Build the frontend:
npm run build
-
Start the production server:
npm run preview
- Backend API: Runs on port 3004
- Frontend: Static files served by backend
- Database: PostgreSQL connection required
- Environment: Production environment variables
- Self-Hosted: VPS or dedicated server
- Cloud Platforms: AWS, Google Cloud, Azure
- Container Deployment: Docker support (planned)
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
[License information would go here]