A comprehensive key management system with role-based access control, built with React frontend and Node.js backend.
- Role-based Access Control: Multiple user roles (Admin, Faculty, Operator, Responder, Security)
- QR Code Integration: Generate and scan QR codes for key access
- Real-time Updates: Socket.io integration for live updates
- Secure Authentication: JWT-based authentication with email verification
- Responsive Design: Mobile-first design with Tailwind CSS
- API Key Management: Comprehensive API key tracking and management
- Frontend: React + Vite + Tailwind CSS
- Backend: Node.js + Express + MongoDB
- Deployment: Vercel (Frontend) + Custom Backend Deployment
- CI/CD: GitHub Actions with automated testing and deployment
- Node.js 18+
- MongoDB
- Git
-
Clone the repository
git clone https://github.com/gurramkarthiknetha/vnr-keys.git cd vnr-keys -
Setup Backend
cd backend npm install cp .env.example .env # Create and configure environment variables npm run dev
-
Setup Frontend
cd frontend npm install npm run dev -
Access the application
- Frontend: http://localhost:5173
- Backend: http://localhost:3000
This project uses GitHub Actions for automated testing, building, and deployment.
- Automated Testing: Linting, building, and syntax checking
- Security Scanning: Dependency audits and secret detection
- Multi-platform Deployment: Vercel (frontend) + Render (backend)
- Dependency Updates: Automated weekly dependency updates
- Branch Protection: Required reviews and status checks
- Issue Tracking: Automatic issue creation for failed deployments
- Commit Tracking: Detailed commit information and issue references
- Deployment Monitoring: Success/failure tracking with notifications
-
Run the setup script
./scripts/setup-cicd.sh
-
Configure GitHub Secrets
VERCEL_TOKEN,VERCEL_ORG_ID,VERCEL_PROJECT_ID
-
Enable Branch Protection
- Require status checks before merging
- Require pull request reviews
For detailed setup instructions, see CI_CD_SETUP.md.
vnr-keys/
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ services/ # API and socket services
β β βββ store/ # State management (Zustand)
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
βββ backend/ # Node.js backend API
β βββ controllers/ # Route controllers
β βββ models/ # MongoDB models
β βββ routes/ # API routes
β βββ middleware/ # Custom middleware
β βββ services/ # Business logic services
βββ .github/workflows/ # GitHub Actions workflows
βββ scripts/ # Utility scripts
NODE_ENV=development
PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173VITE_API_URL=http://localhost:3000
VITE_SOCKET_URL=http://localhost:3000cd frontend
npm run lint
npm run buildcd backend
node -c index.js # Syntax check
npm test # If tests existThe application is automatically deployed when changes are pushed to the main branch:
- Frontend: Deployed to Vercel
- Backend: Deployed to Render
-
Frontend (Vercel)
cd frontend vercel --prod -
Backend (Render)
- Push to main branch triggers automatic deployment
- Or use Render dashboard for manual deployment
- JWT-based authentication
- Role-based access control
- Rate limiting
- CORS protection
- Helmet.js security headers
- Input validation and sanitization
- Secure password hashing (bcrypt)
- GitHub Actions workflow monitoring
- Vercel deployment analytics
- Render service monitoring
- Application error tracking
- 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
-
Create feature branch
git checkout -b feature/your-feature-name
-
Make changes and test locally
# Test frontend cd frontend && npm run lint && npm run build # Test backend cd backend && node -c index.js
-
Push and create PR
- Use the provided PR templates for consistent documentation
- Include issue references in commit messages (
Closes #123) - CI/CD pipeline will automatically run tests
- Ensure all checks pass before merging
- Comprehensive Template:
.github/pull_request_template.md - Simple Template:
.github/pull_request_template_simple.md
Both templates include:
- Change type classification
- Issue number and title
- Fixes and related issues
- Screenshots/videos section
- Documentation updates
- Summary and breaking changes
This project is licensed under the ISC License - see the LICENSE file for details.
- Documentation: CI_CD_SETUP.md, API_KEY_MANAGEMENT.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Frontend: vnr-keys.vercel.app
- Backend: Custom deployment with environment-based configuration
This project is licensed under the MLT License. See the LICENSE file for more details.