https://github.com/iniakunhuda/time-tracking-freelancer
A full-stack time tracking application built with React and Go, designed for freelancers and remote workers to track their time, manage projects, and generate invoices.
https://github.com/iniakunhuda/time-tracking-freelancer
freelance golang reactjs time-tracker time-tracking
Last synced: 3 months ago
JSON representation
A full-stack time tracking application built with React and Go, designed for freelancers and remote workers to track their time, manage projects, and generate invoices.
- Host: GitHub
- URL: https://github.com/iniakunhuda/time-tracking-freelancer
- Owner: iniakunhuda
- License: mit
- Created: 2024-11-06T16:08:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T19:06:58.000Z (7 months ago)
- Last Synced: 2025-01-19T09:26:19.014Z (5 months ago)
- Topics: freelance, golang, reactjs, time-tracker, time-tracking
- Language: TypeScript
- Homepage:
- Size: 4.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time Tracker Application
A full-stack time tracking application built with React and Go, designed for freelancers and remote workers to track their time, manage projects, and generate invoices.
## Features
- 👤 User authentication with JWT
- ⏱️ Project-based time tracking with start/stop timer
- 📊 Visual analytics (daily/weekly/monthly)
- 💰 Multiple hourly rates for different projects
- 📋 Task management with categorization and tagging
- 📄 Invoice generation with PDF export
- 📱 Responsive design for mobile and desktop## Tech Stack
### Frontend
- React with TypeScript
- TailwindCSS for styling
- Shadcn UI components
- React Query for data fetching
- React Router for navigation
- Chart.js for visualizations
- jsPDF for invoice generation### Backend
- Go (Golang)
- Gin web framework
- GORM for database operations
- PostgreSQL database
- JWT for authentication## Screenshot
![]()
List Project
![]()
Add Project
![]()
List Task
![]()
Add Task
![]()
Detail Time Tracking by Task
![]()
Time Tracking Dashboard
![]()
Analytics Daily, Weekly, and Monthly
![]()
Generate Report based Start Date and End Date
![]()
PDF Report Invoice
## Prerequisites
Before you begin, ensure you have installed:
- Node.js (v18 or later)
- Go (v1.19 or later)
- PostgreSQL (v12 or later)## Getting Started
### Backend Setup
1. Navigate to the backend directory:
```bash
cd backend
```2. Install Go dependencies:
```bash
go mod tidy
```3. Create a `.env` file:
```env
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/timetracker?sslmode=disable
JWT_SECRET=your-secret-key
PORT=8080
```4. Create the database:
```sql
CREATE DATABASE timetracker;
```5. Run the server:
```bash
go run cmd/main.go
```### Frontend Setup
1. Navigate to the frontend directory:
```bash
cd client
```2. Install dependencies:
```bash
npm install
```3. Create a `.env` file:
```env
VITE_API_URL=http://localhost:8080/api
```4. Start the development server:
```bash
npm run dev
```## Project Structure
```
├── backend/
│ ├── cmd/
│ │ └── main.go
│ ├── internal/
│ │ ├── config/
│ │ ├── models/
│ │ ├── handlers/
│ │ ├── middleware/
│ │ └── utils/
│ └── README.md
│
└── client/
├── src/
│ ├── api/
│ ├── components/
│ ├── contexts/
│ ├── features/
│ ├── hooks/
│ └── lib/
└── README.md
```## API Endpoints
### Authentication
- `POST /api/auth/register` - Register new user
- `POST /api/auth/login` - Login user### Projects
- `GET /api/projects` - List all projects
- `POST /api/projects` - Create new project
- `PUT /api/projects/:id` - Update project
- `DELETE /api/projects/:id` - Delete project### Time Entries
- `GET /api/time-entries` - List time entries
- `POST /api/time-entries` - Create time entry
- `PUT /api/time-entries/:id` - Update time entry
- `DELETE /api/time-entries/:id` - Delete time entry### Tasks
- `GET /api/tasks` - List tasks
- `POST /api/tasks` - Create task
- `PUT /api/tasks/:id` - Update task
- `DELETE /api/tasks/:id` - Delete task### Analytics
- `GET /api/analytics/daily` - Get daily analytics
- `GET /api/analytics/weekly` - Get weekly analytics
- `GET /api/analytics/monthly` - Get monthly analytics### Invoices
- `POST /api/invoices/generate` - Generate invoice## Available Scripts
### Backend
```bash
# Run server
go run cmd/main.go# Run tests
go test ./...
```### Frontend
```bash
# Start development server
npm run dev# Build for production
npm run build# Preview production build
npm run preview
```## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments
- [Shadcn UI](https://ui.shadcn.com/) for the beautiful UI components
- [Gin Web Framework](https://gin-gonic.com/) for the Go web framework
- [GORM](https://gorm.io/) for the ORM library