Sharingan is a comprehensive application monitoring system designed to help teams track, manage, and respond to application incidents effectively. The system provides real-time monitoring, incident management, and notification capabilities.
# Clone the repository
git clone https://github.com/yourusername/sharingan.git
# Set up environment variables
cp .env.example .env
cp api/.env.example api/.env
cp frontend/.env.example frontend/.env
# Start development environment
docker-compose -f compose.dev.yaml up -d
Sharingan uses a modern microservices architecture:
- Frontend: Next.js-based user interface
- Backend API: Go/Gin RESTful API
- Authentication: Keycloak for identity and access management
- Database: PostgreSQL for data persistence
sequenceDiagram
participant User as Utilisateur (Frontend)
participant Frontend as Frontend (Next.js)
participant Keycloak as Keycloak Server
participant Backend as Backend (Go/Gin)
User->>Frontend: Tentative de connexion
Frontend->>Keycloak: Redirection vers Keycloak pour l'authentification
alt Authentification réussie
Keycloak-->>Frontend: Redirection vers l'application avec un JWT
note right of Frontend: Stocke le JWT (localStorage/Cookie sécurisé)
else Authentification échouée
Keycloak-->>Frontend: Redirige l'utilisateur<br>vers la page de connexion Keycloak
end
User->>Frontend: Effectue une requête API avec le JWT
Frontend->>Backend: Envoie une requête API avec le JWT<br>(Header Authorization: Bearer <JWT>)
Backend->>Keycloak: Valide le JWT
alt JWT valide
Keycloak-->>Backend: Réponse OK (JWT valide)
Backend-->>Frontend: Réponse avec les données demandées
else JWT invalide ou expiré
Keycloak-->>Backend: Réponse (JWT invalide)
Backend-->>Frontend: Erreur 401 Unauthorized
end
- Application Group Management: Organize applications into logical groups
- Real-time Monitoring: Monitor application health with customizable checks
- Incident Management: Track and resolve application incidents
- User Authentication: Secure access with Keycloak integration
- Notification System: Subscribe to alerts for specific applications
An organizational unit that contains multiple applications.
A monitored application with URL, success criteria, and related incidents.
A record of an event or problem related to an application.
- Frontend: Next.js, TypeScript, React
- Backend: Go, Gin Framework
- Database: PostgreSQL
- Authentication: Keycloak
- Containerization: Docker, Docker Compose
- Documentation: Swagger
sharingan/
├── api/ # Go backend API
├── frontend/ # Next.js frontend application
├── devops/ # DevOps configurations and tools
├── class_diagram.uxf # UML class diagram
├── compose.dev.yaml # Docker Compose for development
└── command.sh # Utility shell scripts
- Docker and Docker Compose
- Go 1.20+
- Node.js 18+
- PostgreSQL 17
The development environment can be started using Docker Compose:
docker-compose -f compose.dev.yaml up -d
This will start all services including:
- Frontend (Next.js)
- Backend API (Go/Gin)
- PostgreSQL database
- Keycloak authentication server
- PGAdmin database interface
API documentation is available via Swagger UI at /swagger/index.html
when the API is running.
The project includes various utility scripts in command.sh
to help with common development tasks:
# Generate .env.example files from .env files
./command.sh generate-env-example
# Additional commands can be found by exploring the script
cd api
go test ./tests/... -v
cd frontend
npm test
Sharingan uses automated CI/CD pipelines for building, testing, and deploying the application.
The project supports multiple container registries:
- GitLab Container Registry: Images are automatically built and pushed to GitLab Registry using GitLab CI Pipeline
- GitHub Container Registry: Support for GitHub Container Registry using GitHub Actions is planned (not yet implemented)
The application is designed to be deployed on AWS using Kubernetes and Helm charts:
- EKS for container orchestration
- RDS for PostgreSQL database
- ECR for container images
- CloudWatch for monitoring and logging
See the DevOps README for detailed deployment instructions.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some 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.