The Meditation App is a full-stack web application that allows users to record and share their meditation experiences. Users can create posts with text content, images, and location data, interact with other users' posts through comments, and explore meditation experiences from around the world.
- Frontend: React.js, Tailwind CSS, Framer Motion
- Backend: Node.js, Express.js
- Database: MySQL with Sequelize ORM
- Container: Docker
- Orchestration: Kubernetes
- Authentication: Passport.js with Local Strategy
- Testing: Jest, Supertest
- CI/CD: GitHub Actions
meditation-app/
├── src/
│ ├── client/ # React frontend code
│ ├── routes/ # Express route handlers
│ ├── models/ # Sequelize models
│ ├── config/ # Configuration files
│ └── app.js # Main application entry
├── views/ # EJS templates
├── public/ # Static assets
├── k8s/ # Kubernetes configurations
└── docker/ # Docker configurations
- User registration and login system
- Session-based authentication
- Password hashing using bcrypt
- Implementation can be found in
src/routes/users.js
- Rich text editing using TipTap editor
- Multiple image upload support (up to 5 images per post)
- Location tagging with Google Maps integration
- Implementation details in
src/routes/blog.jsandsrc/client/blog/Create/CreatePost.js
- Users table with UUID primary keys
- Posts table with location support
- Comments and Images tables with proper relationships
- Models and associations defined in
src/models/directory
- Unit tests for models and utilities
- Integration tests for API endpoints
- Test environment configuration
- Separate SQLite database for testing
- Coverage reporting
- Automated testing on push and pull requests
- Docker image building and publishing
- Multi-architecture support (amd64/arm64)
- Automated deployment workflow
- Clone the repository
git clone https://github.com/Ziqiao-git/meditation-app.git- Install dependencies
npm install- Set up environment variables in
.envfile
DB_HOST=localhost
NODE_ENV=development
GOOGLE_MAPS_API_KEY=your_api_key
- Start the development server
npm run devStart- Dockerfile available in project root
- Uses Node.js 20-slim as base image
- Includes necessary directory setup and dependency installation
- See
Dockerfilefor implementation details
The application uses several Kubernetes configurations:
-
App Deployment (
k8s/app-development.yaml)- Single replica deployment
- Environment configuration
- Volume mounts for uploads
-
MySQL Deployment (
k8s/mysql-deployment.yaml)- Persistent volume for data storage
- Root password configuration
- Native password authentication
-
Services (
k8s/app-service.yaml)- LoadBalancer type service
- Port 3000 exposed
# Build and deploy
docker build -t meditation-app:latest .
kubectl apply -f k8s/app-development.yaml
kubectl apply -f k8s/app-service.yaml
# Verify deployment
kubectl get pods -l app=meditation-app
kubectl port-forward service/meditation-app-service 3000:3000The demo gives you a quick overview of what this project is, what is the focus and how evrything works if you cannot see the my website. (Probably because the AWS charges too much) https://youtu.be/882FFAY7NNE
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the ISC License.
Ziqiao Xi
For more information or issues, please visit the GitHub repository.