Skip to content

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.

License

Notifications You must be signed in to change notification settings

iniakunhuda/time-tracking-freelancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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:
cd backend
  1. Install Go dependencies:
go mod tidy
  1. Create a .env file:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/timetracker?sslmode=disable
JWT_SECRET=your-secret-key
PORT=8080
  1. Create the database:
CREATE DATABASE timetracker;
  1. Run the server:
go run cmd/main.go

Frontend Setup

  1. Navigate to the frontend directory:
cd client
  1. Install dependencies:
npm install
  1. Create a .env file:
VITE_API_URL=http://localhost:8080/api
  1. Start the development server:
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

# Run server
go run cmd/main.go

# Run tests
go test ./...

Frontend

# 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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published