A comprehensive platform for real-time data analysis and visualization with self-hosting capabilities. Opensight combines a modern Next.js frontend with a powerful Express backend to deliver intelligent data insights.
- Real-time data analysis and processing
- Interactive dashboard and visualization interface
- RESTful API with comprehensive documentation
- PostgreSQL database with optimized queries
- Redis caching for high-performance operations
- Docker containerization for easy deployment
- TypeScript throughout for type safety
- Monorepo architecture with Turbo for efficient builds
- Development and production configurations
- Node.js 20+ (for local development)
- npm/yarn package manager
- PostgreSQL 16+ (for database)
- Redis 7+ (for caching)
- Clone the repository:
git clone https://github.com/yourusername/opensight.git
cd opensight- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration- Start development services (PostgreSQL + Redis):
docker-compose -f docker/docker-compose.dev.yml up -d- Run the development servers:
npm run devThis will start:
- Web: http://localhost:3000
- API: http://localhost:4000
Deploy the entire application stack (web, API, PostgreSQL, and Redis) using Docker Compose:
# Build and start all services
docker-compose -f docker/docker-compose.yml up -d
# View logs
docker-compose -f docker/docker-compose.yml logs -f
# Stop services
docker-compose -f docker/docker-compose.yml downServices will be available at:
- Web UI: http://localhost:3000
- API: http://localhost:4000
- PostgreSQL: localhost:5432
- Redis: localhost:6379
Update the .env file before deployment with your specific settings:
# Database
DATABASE_URL=postgresql://opensight:opensight@postgres:5432/opensight
# Redis
REDIS_URL=redis://redis:6379
# API Configuration
API_PORT=4000
API_HOST=0.0.0.0
# Web Configuration
NEXT_PUBLIC_API_URL=http://localhost:4000To run only PostgreSQL and Redis for local development:
docker-compose -f docker/docker-compose.dev.yml up -d- Frontend: Next.js 14, React 18, TypeScript
- Backend: Express, Node.js, TypeScript
- Database: PostgreSQL 16
- Cache: Redis 7
- Containerization: Docker, Docker Compose
- Build Tool: Turbo
- Package Manager: npm
opensight/
├── apps/
│ ├── api/ # Express backend application
│ └── web/ # Next.js frontend application
├── packages/
│ ├── db/ # Database utilities and migrations
│ ├── shared/ # Shared types and utilities
│ ├── analyzer/ # Data analysis engine
│ └── engine-clients/ # Engine client libraries
├── docker/
│ ├── Dockerfile.web # Next.js production build
│ ├── Dockerfile.api # Express production build
│ ├── docker-compose.yml # Full stack configuration
│ └── docker-compose.dev.yml # Development stack
└── README.md # This file
The API server provides comprehensive REST endpoints documented at:
- Swagger UI: http://localhost:4000/api/docs
- OpenAPI Spec: http://localhost:4000/api/spec
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage# Build all applications
npm run build
# Build specific application
npm run build -- --filter=api
npm run build -- --filter=web# Format code with Prettier
npm run format
# Lint code with ESLint
npm run lintContributions are welcome! Please follow these guidelines:
- 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
Please ensure all tests pass and code is properly formatted before submitting.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, issues, or questions:
- Open an issue on GitHub
- Check existing documentation
- Review API documentation at
/api/docs
Made with by the Opensight Team