A full-stack time tracking application with modern UI, cross-platform support, and professional CI/CD pipeline
- Time Tracking: Start/stop timers with project categorization
- Location Tracking: Automatic GPS location capture for time entries
- Photo Attachments: Camera integration for visual time entry notes
- Export Functionality: CSV export with user-friendly data
- Interactive Maps: Visual location display for time entries
- Glass Morphism Design: Beautiful modern interface with floating elements
- Responsive Design: Works seamlessly on web, mobile, and tablet
- Dark/Light Theme: Adaptive theming with smooth transitions
- Hamburger Navigation: Intuitive sidebar navigation with hover effects
- Animated Components: Smooth animations and micro-interactions
- Multi-language Support: Arabic (AR), English (EN), German (DE)
- RTL Support: Right-to-left layout for Arabic
- Language Switcher: Easy language switching in the header
- Web Application: Progressive Web App (PWA) capabilities
- iOS App: Native iOS app with Capacitor
- Mobile Responsive: Optimized for all screen sizes
- JWT Authentication: Secure token-based authentication
- Password Hashing: Bcrypt password encryption
- CORS Protection: Configured cross-origin resource sharing
- Input Validation: Comprehensive server-side validation
- CI/CD Pipeline: Automated testing, building, and deployment
- Git Branching Strategy: Professional dev β staging β prod workflow
- Code Quality: ESLint, Prettier, TypeScript strict mode
- Performance Monitoring: Lighthouse CI integration
- Security Scanning: Automated vulnerability detection
- Angular 17+: Modern standalone components architecture
- Ionic 7+: Cross-platform UI framework
- NGXS: State management
- TypeScript: Type-safe development
- SCSS: Advanced styling with CSS variables
- Capacitor: Native mobile app development
- Go 1.21+: High-performance backend language
- Buffalo: Web framework and tooling
- Pop: Database ORM and migrations
- PostgreSQL: Robust relational database
- JWT: Secure authentication tokens
- GitHub Actions: CI/CD automation
- Docker: Containerization support
- Lighthouse CI: Performance monitoring
- Trivy: Security vulnerability scanning
- Branch Protection: Professional Git workflow
TimeTrac/
βββ π backend/ # Go Buffalo backend
β βββ π actions/ # HTTP handlers and routes
β β βββ auth_actions.go # Authentication endpoints
β β βββ timetrac_actions.go # Time tracking endpoints
β β βββ auth_middleware.go # JWT middleware
β βββ π models/ # Database models
β β βββ user.go # User model
β β βββ timetrac.go # Time entry model
β β βββ auth_token.go # JWT token model
β βββ π migrations/ # Database migrations
β βββ π database.yml # Database configuration
βββ π timetrac-frontend/ # Angular Ionic frontend
β βββ π src/
β β βββ π app/
β β β βββ π core/ # Core services
β β β β βββ auth.service.ts
β β β β βββ time.service.ts
β β β β βββ i18n.service.ts
β β β βββ π features/ # Feature modules
β β β β βββ π auth/ # Authentication
β β β β βββ π home/ # Time tracking
β β β βββ π layout/ # Layout components
β β β βββ π state/ # NGXS state management
β β βββ π assets/ # Static assets
β β βββ π environments/ # Environment configs
β βββ π ios/ # iOS app configuration
β βββ π lighthouserc.json # Performance testing config
βββ π .github/ # GitHub Actions workflows
β βββ π workflows/
β βββ ci-dev.yml # Development CI
β βββ ci-staging.yml # Staging CI
β βββ ci-prod.yml # Production CI
βββ π docs/ # Documentation
βββ π docker-compose.yml # Docker configuration
- Go 1.21+ - Download
- Node.js 20+ - Download
- PostgreSQL 14+ - Download
- Buffalo CLI - Installation Guide
-
Clone the repository
git clone https://github.com/Abudi7/buffalo_angular.git cd buffalo_angular
-
Setup Database
# Create database createdb timetrac # Create user and grant permissions psql -d timetrac -c "CREATE USER app WITH PASSWORD 'apppass';" psql -d timetrac -c "GRANT ALL PRIVILEGES ON DATABASE timetrac TO app;" psql -d timetrac -c "CREATE EXTENSION IF NOT EXISTS pgcrypto;"
-
Backend Setup
cd backend # Install dependencies go mod tidy # Run migrations GO_ENV=development buffalo pop migrate up # Set environment variables export JWT_SECRET="your-secret-key-here" # Start backend server buffalo dev
-
Frontend Setup
cd timetrac-frontend # Install dependencies npm install # Start development server npm start
-
Access the Application
- Web: http://localhost:4200
- Backend API: http://localhost:8087
- API Documentation: http://localhost:8087/api/docs
-
Install iOS Dependencies
cd timetrac-frontend npm install npx cap sync ios
-
Open in Xcode
npx cap open ios
-
Build and Run
- Open the project in Xcode
- Select your target device or simulator
- Build and run the project
JWT_SECRET=your-jwt-secret-key
DB_HOST=localhost
DB_PORT=5432
DB_NAME=timetrac
DB_USER=app
DB_PASSWORD=apppass
// src/environments/environment.ts
export const environment = {
production: false,
API_BASE: "http://localhost:8087",
};
Update backend/database.yml
:
development:
dialect: "postgres"
database: "timetrac"
user: "app"
password: "apppass"
host: "127.0.0.1"
port: "5432"
cd backend
go test ./...
cd timetrac-frontend
npm test
cd timetrac-frontend
npm run e2e
cd timetrac-frontend
npm run build
npx lhci autorun
# Backend
cd backend && buffalo dev
# Frontend
cd timetrac-frontend && npm start
# Build for staging
cd timetrac-frontend
npm run build -- --configuration=staging
# Build for production
cd timetrac-frontend
npm run build -- --configuration=production
# Build and run with Docker Compose
docker-compose up --build
dev
: Development branch with feature integrationstaging
: Staging environment for testingprod
: Production-ready releases
- Development CI: Linting, testing, building
- Staging CI: Full testing, performance monitoring
- Production CI: Security scanning, deployment, release creation
# Merge dev to staging
git checkout staging
git merge dev
git push origin staging
# Merge staging to prod
git checkout prod
git merge staging
git push origin prod
- Performance Score: Monitored on each deployment
- Accessibility: WCAG compliance checking
- SEO: Search engine optimization metrics
- PWA: Progressive Web App capabilities
- Performance: 50% minimum
- Accessibility: 80% minimum
- Best Practices: 70% minimum
- SEO: 70% minimum
- PWA: 30% minimum
- JWT-based authentication
- Secure password hashing with bcrypt
- Token expiration and refresh
- CORS configuration
- Input validation and sanitization
- SQL injection prevention
- XSS protection
- Automated vulnerability scanning with Trivy
- Dependency audit with npm audit
- Go module security with Nancy
- English (EN): Default language
- Arabic (AR): RTL support
- German (DE): European localization
- Add language code to
i18n.service.ts
- Create translation files
- Update language switcher component
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginGET /api/auth/me
- Get current user
POST /api/timetrac/start
- Start time trackingPOST /api/timetrac/stop
- Stop time trackingGET /api/timetrac/entries
- Get time entriesGET /api/timetrac/export
- Export time data
- 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
- Follow Angular style guide
- Write comprehensive tests
- Update documentation
- Follow conventional commits
This project is licensed under the MIT License - see the LICENSE file for details.
- Angular - Frontend framework
- Ionic - Mobile UI framework
- Buffalo - Go web framework
- Capacitor - Native app development
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
Made with β€οΈ by the TimeTrac Team