A comprehensive women's health platform built with pure Ballerina backend microservices and a modern Next.js frontend. Features AI-powered health insights, period tracking, wellness monitoring, and personalized care recommendations.
- Smart Period Tracking - AI-powered cycle predictions and calendar
- Wellness Monitoring - Mood, energy, sleep, and symptom tracking
- Health News - Curated women's health articles and bookmarking
- AI Health Assistant - Google Gemini-powered chatbot for health queries
- Secure Authentication - WSO2 Asgardeo OAuth integration
- Analytics & Insights - Beautiful charts and wellness trends
- Modern UI - Responsive design with Tailwind CSS and shadcn/ui
- Ballerina (for backend services)
- Node.js 18+ (for frontend)
- Google Gemini API Key (for AI chatbot)
# Terminal 1 - Wellness Service (Port 8082)
cd back-end/wellness-api
bal run
# Terminal 2 - News Service (Port 8060)
cd back-end/news_service
bal run
# Terminal 3 - Period Service (Port 8081)
cd back-end/period_service
bal runcd front-end
.env.local
# Add your Google Gemini API key to .env.local
cd back-end/news_service/main.bal
Place your newsapi.org api key in the placeholdercd front-end
npm install
npm run dev- Frontend: http://localhost:3001
- Wellness API: http://localhost:8082
- News API: http://localhost:8060
- Period API: http://localhost:8081
Our backend consists of three independent Ballerina microservices:
-
π₯ Wellness API -
http://localhost:8082GET /api/wellness/health # Service health check POST /api/wellness/entries # Add wellness entry GET /api/wellness/users/{id}/entries # Get user wellness history PUT /api/wellness/entries/{date} # Update wellness entry
-
** News Service** -
http://localhost:8060GET /api/news/health # Service health check GET /api/news/articles # Get categorized health news POST /api/news/bookmarks # Bookmark article GET /api/news/bookmarks/{userId} # Get user bookmarks
-
** Period Service** -
http://localhost:8081GET /api/period/health # Service health check POST /api/period/predict # Generate cycle predictions GET /api/period/calendar/{year}/{month} # Get calendar data POST /api/period/cycles # Log period data
- Framework: Next.js 14 with App Router
- Styling: Tailwind CSS + shadcn/ui components
- State Management: React Context API
- Authentication: WSO2 Asgardeo OAuth
- Charts: Recharts for wellness analytics
- Animations: Framer Motion
- AI Integration: Google Gemini API for chatbot
graph TB
A[React Frontend] --> B[Context Providers]
B --> C[HTTP API Calls]
C --> D[Ballerina Services]
D --> E[In-Memory Storage]
E --> D
D --> C
C --> B
B --> A
F[Google Gemini API] --> G[AI Chatbot]
G --> A
Each Ballerina service provides health check endpoints for monitoring:
# Test all services
curl http://localhost:8082/api/wellness/health
curl http://localhost:8060/api/news/health
curl http://localhost:8081/api/period/health- Smart Predictions: cycle forecasting
- Calendar View: 90-day period tracking calendar
- Fertility Windows: Ovulation and fertile period calculations
- Cycle Analytics: Trend analysis and irregularity detection
- Mood Tracking: Daily emotional state logging
- Energy Levels: Physical energy and activity monitoring
- Sleep Quality: Sleep duration and quality assessment
- Symptom Correlation: Pattern recognition across health metrics
- Curated Content: Women's health focused articles
- Smart Categorization: AI-powered content classification
- Bookmark System: Save articles for later reading
- Personalized Feed: Recommendations based on user interests
- 24/7 Availability: Always-on health guidance
- Context-Aware: Understanding of women's health topics
- Privacy-First: Secure conversation handling
- Multi-lingual: Support for various languages
# .env.local (frontend)
GEMINI_API_KEY=your_gemini_api_key
NEXT_PUBLIC_WELLNESS_API_URL=http://localhost:8082/api/wellness
NEXT_PUBLIC_NEWS_API_URL=http://localhost:8060/api/news
NEXT_PUBLIC_PERIOD_API_URL=http://localhost:8081/api/period# Build containers
docker-compose build
# Start all services
docker-compose up- Language: Ballerina
- Architecture: Microservices
- Storage: In-memory (demo) / Database ready
- API Style: RESTful HTTP/JSON
- Framework: Next.js 14 (React 18)
- Language: TypeScript
- Styling: Tailwind CSS
- Components: shadcn/ui (Radix UI)
- State: React Context + Custom Hooks
- Charts: Recharts
- Animations: Framer Motion
- Auth: WSO2 Asgardeo OAuth
- Chatbot: Google Gemini Pro
- News: Integrated news aggregation
- Authentication: WSO2 Identity Server
- 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
SheCare/
βββ back-end/
β βββ wellness-api/ # Wellness tracking service
β βββ news_service/ # Health news service
β βββ period_service/ # Period tracking service
βββ front-end/
β βββ app/ # Next.js app directory
β βββ components/ # Reusable UI components
β βββ contexts/ # React Context providers
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utility functions
βββ README.md # Project documentation
For questions, issues, or contributions:
- Repository: SheCare GitHub
- Issues: Use GitHub Issues for bug reports and feature requests
- Discussions: Join the GitHub Discussions for community support
Built with β€οΈ for the Ballerina Competition 2025