Developer Guide¶
Documentation for developers working on or extending KrakenHashes.
In This Section¶
-
:material-architecture:{ .lg .middle } System Architecture
Understanding the overall system design and components
-
Working with the Go backend, APIs, and services
-
React frontend, Material-UI components, and state management
-
Agent architecture, hardware detection, and job execution
Getting Started¶
Prerequisites¶
- Go 1.21+ for backend development
- Node.js 18+ for frontend development
- Docker and Docker Compose for testing
- PostgreSQL 15+ for database
- Git for version control
Development Setup¶
-
Clone the repository
-
Set up development environment
- Copy
.env.example
to.env
- Configure database connection
-
Set development flags
-
Start services
Development Workflow¶
Code Organization¶
krakenhashes/
├── backend/ # Go backend service
├── frontend/ # React frontend
├── agent/ # Go agent system
├── docs/ # Documentation
└── scripts/ # Utility scripts
Key Technologies¶
- Backend: Go, Gin, GORM, JWT, WebSocket
- Frontend: React, TypeScript, Material-UI, React Query
- Database: PostgreSQL with migrations
- Agent: Go, Hashcat integration, Hardware detection
- Communication: REST API, WebSocket, TLS
Contributing Guidelines¶
Pre-v1.0 Status
External contributions are not being accepted until v1.0 release. This documentation is for understanding the codebase structure.
Code Standards¶
- Follow Go conventions for backend code
- Use TypeScript strictly in frontend
- Write tests for new functionality
- Document complex algorithms
- Keep security in mind
Testing¶
- Unit tests alongside code (
*_test.go
) - Integration tests in
integration_test/
- Frontend tests with React Testing Library
- Manual testing with Docker environment
Architecture Principles¶
- Separation of Concerns
- Clear boundaries between layers
- Repository pattern for data access
-
Service layer for business logic
-
Security First
- Authentication on all endpoints
- Input validation and sanitization
-
Secure communication channels
-
Scalability
- Distributed agent architecture
- Efficient job scheduling
-
Resource pooling
-
Maintainability
- Clear code organization
- Comprehensive error handling
- Extensive logging
Need Help?¶
- Check existing code patterns
- Review test files for examples
- Join Discord development channel