A modern, real-time API monitoring and analytics platform built with Next.js 15, TypeScript, and NextAuth.js. RunTime provides comprehensive insights into your API performance, security, and usage patterns.
- Live API Performance Tracking - Monitor response times, error rates, and throughput
- Request/Response Logging - Detailed logs with headers, body, and timing data
- Endpoint Analytics - Track individual endpoint performance and usage patterns
- Security Monitoring - Detect and alert on security issues and vulnerabilities
- Performance Dashboards - Visualize API metrics with interactive charts
- Geographic Heatmaps - See where your API requests are coming from
- Trend Analysis - Track performance trends over time
- Custom Time Ranges - Filter data by 1h, 24h, 7d, or 30d periods
- Multiple Auth Providers - Google OAuth, GitHub OAuth, and Email/Password
- JWT Token Management - Secure session handling with backend integration
- User Profile Management - Update profile, change password, export data
- Account Security - Password changes and account deletion
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
- Dark Theme - Beautiful dark mode with gradient backgrounds
- Interactive Components - Smooth animations and transitions
- Real-Time Updates - Live data refresh every 30 seconds
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- SCSS/Sass - Styling with CSS modules
- Framer Motion - Smooth animations
- Recharts - Data visualization
- Ark UI - Headless UI components
- SWR - Data fetching and caching
- NextAuth.js - Authentication framework
- Google OAuth - Social login
- GitHub OAuth - Developer-friendly login
- JWT Tokens - Secure session management
- REST API - Express.js backend integration
- Real-Time Data - Live API monitoring
- Error Handling - Comprehensive error management
- Data Validation - Input validation and sanitization
src/
├── app/ # Next.js App Router
│ ├── components/ # Reusable UI components
│ │ ├── analytics/ # Analytics-specific components
│ │ ├── charts/ # Chart components
│ │ ├── layout/ # Layout components
│ │ └── sidebar/ # Navigation components
│ ├── projects/ # Project management pages
│ │ └── [projectId]/ # Individual project pages
│ │ ├── overview/ # Project overview dashboard
│ │ ├── requests/ # Request logs and analytics
│ │ ├── endpoints/ # Endpoint monitoring
│ │ └── api/ # API information
│ ├── analytics/ # Global analytics
│ ├── settings/ # User settings
│ ├── login/ # Authentication pages
│ └── signup/
├── lib/ # Utility libraries
│ ├── apiClient.ts # Backend API client
│ └── auth.ts # NextAuth configuration
├── styles/ # SCSS stylesheets
│ ├── components/ # Component-specific styles
│ ├── pages/ # Page-specific styles
│ └── _variables.scss # SCSS variables
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
└── endpointNormalization.ts # Endpoint path normalization
- Node.js 18+
- npm or yarn
- Backend API server (Express.js with Prisma)
-
Clone the repository
git clone <repository-url> cd treblle-hackathon
-
Install dependencies
npm install
-
Environment Setup Create a
.env.localfile in the root directory:# NextAuth Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret # OAuth Providers GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret GITHUB_ID=your-github-client-id GITHUB_SECRET=your-github-client-secret # Backend API NEXT_PUBLIC_API_URL=http://localhost:8080 NEXT_PUBLIC_INTERNAL_API_KEY=internal-api-key-123
-
Start the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
The frontend integrates with a backend API that should provide the following endpoints:
POST /api/auth/register- User registrationPOST /api/auth/session- User authenticationPOST /api/auth/oauth-user- OAuth user creation
GET /api/projects- List user projectsPOST /api/projects- Create new projectGET /api/projects/{id}/overview- Project overview dataGET /api/projects/{id}/requests- Project request logsGET /api/projects/{id}/endpoints- Project endpoints
GET /api/projects/{id}/kpis- Key performance indicatorsGET /api/projects/{id}/charts- Chart dataGET /api/projects/{id}/errors- Error analyticsGET /api/projects/{id}/security-issues- Security issues
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add authorized redirect URI:
http://localhost:3000/api/auth/callback/google
- Go to GitHub Settings > Developer settings > OAuth Apps
- Create a new OAuth App
- Set Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Create and manage multiple API projects
- Real-time project health monitoring
- Detailed project analytics and insights
- Live request logging with detailed information
- Request filtering by method, status, and time range
- Request detail sidebar with headers, body, and timing
- Pagination and sorting capabilities
- Endpoint path normalization (e.g.,
/posts/123→/posts/{id}) - Endpoint grouping and aggregation
- Performance metrics per endpoint
- Error rate tracking
- Security issue detection and alerting
- Risk level classification (low, medium, high, critical)
- Security score calculation
- Vulnerability tracking
- Profile management and settings
- Password change functionality
- Data export capabilities
- Account deletion
Button- Styled button component with variantsCommonState- Loading, error, and empty state componentsApiEndpointCard- Project overview cardsRequestDetailSidebar- Detailed request informationEndpointsMenu- Filtering and view mode controls
DashboardLayout- Main dashboard layoutGlobalSidebar- Navigation sidebarProjectSidebar- Project-specific navigationConditionalNavbar- Context-aware navigation
TimeSeriesChart- Time-based data visualizationProjectPerformanceChart- Performance metricsRequestsTrendChart- Request trend analysisGeoHeatmap- Geographic request distribution
- JWT token-based authentication
- Secure session management
- OAuth 2.0 integration
- Password hashing and validation
- Input validation and sanitization
- XSS protection
- CSRF protection via NextAuth
- Secure API communication
- User data export
- Account deletion
- Secure password changes
- Session management
The application is fully responsive and optimized for:
- Desktop - Full-featured dashboard experience
- Tablet - Optimized touch interface
- Mobile - Streamlined mobile experience
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push to main branch
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]- 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
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Check the documentation in the
/docsfolder - Review the API integration guide
- Real-time notifications
- Custom alert rules
- API documentation generation
- Team collaboration features
- Advanced analytics and reporting
- Mobile app development
- Webhook integrations
- Custom dashboard widgets
- Data caching optimization
- Lazy loading implementation
- Bundle size optimization
- Database query optimization
Built with ❤️ for the Treblle Hackathon
RunTime - Smarter API Performance. Real-Time Insights.