Skip to content

piyushpradhan/workstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WorkStack

Project Management Made Simple

WorkStack Dashboard

WorkStack is a modern, full-stack project management application that helps teams organize projects, manage tasks, and collaborate effectively. Built with performance and developer experience in mind.

✨ Features

  • πŸ“‹ Project Management - Create, organize, and track projects with multiple statuses
  • βœ… Task Management - Comprehensive task system with priorities, dependencies, and status tracking
  • πŸ‘₯ Team Collaboration - Multi-user support with role-based access control (Admin, Manager, Member, Viewer)
  • πŸ” Secure Authentication - JWT-based auth with refresh tokens, multiple session support, and password reset
  • 🎨 Modern UI - Beautiful, responsive interface built with React and Tailwind CSS
  • πŸš€ High Performance - Fastify backend optimized for speed and scalability
  • πŸ“± Real-time Updates - React Query for efficient data fetching and caching
  • 🎯 Task Dependencies - Link tasks with blocking, dependency, and related relationships

πŸ—οΈ Tech Stack

Backend

  • Framework: Fastify - High-performance Node.js web framework
  • Language: TypeScript
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT with secure session management
  • Caching: Redis
  • API Documentation: Swagger/OpenAPI

Frontend

  • Framework: React 19 with TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS 4
  • UI Components: Radix UI primitives
  • State Management: TanStack Query (React Query)
  • Routing: React Router v7
  • Animations: Motion (Framer Motion)
  • Drag & Drop: React DnD

Infrastructure

  • Package Manager: pnpm with workspaces (monorepo)
  • Containerization: Docker & Docker Compose
  • Deployment: Fly.io configuration included
  • Code Quality: ESLint, Prettier, TypeScript

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Redis (optional, for caching)
  • pnpm (recommended) or npm

Installation

  1. Clone the repository
git clone https://github.com/piyushpradhan/workstack.git
cd workstack
  1. Install dependencies
pnpm install
  1. Set up environment variables

Create .env files in both apps/backend and apps/frontend directories:

Backend (apps/backend/.env):

DATABASE_URL="postgresql://user:password@localhost:5432/workstack"
DIRECT_URL="postgresql://user:password@localhost:5432/workstack"
NODE_ENV="development"
PORT=3000
HOST=0.0.0.0
JWT_SECRET="your-secret-key-change-in-production"
CORS_ORIGIN="http://localhost:8080"
REDIS_URL="127.0.0.1"
REDIS_PORT=6379

Frontend (apps/frontend/.env):

VITE_API_URL="http://localhost:3000"
  1. Set up the database
# Generate Prisma client
pnpm --filter backend db:generate

# Run database migrations
pnpm --filter backend db:migrate

# Seed the database (optional)
pnpm --filter backend db:seed
  1. Start the development servers
# Start both backend and frontend
pnpm dev

# Or start them separately:
pnpm dev:backend   # Backend only (port 3000)
pnpm dev:frontend  # Frontend only (port 8080)

The application will be available at:

🐳 Docker Deployment

Using Docker Compose

  1. Set up environment variables

Create a .env file in the root directory with all required variables (see Installation section).

  1. Build and start containers
docker-compose up -d
  1. Run database migrations
docker-compose exec backend pnpm db:migrate:deploy
  1. Access the application

Individual Docker Builds

See the Dockerfiles in apps/backend/Dockerfile and apps/frontend/Dockerfile for containerization details.

πŸ”§ Configuration

Backend Configuration

The backend uses environment variables for configuration. Key settings include:

  • DATABASE_URL - PostgreSQL connection string
  • JWT_SECRET - Secret key for JWT tokens
  • CORS_ORIGIN - Allowed CORS origins
  • REDIS_URL - Redis connection URL
  • RATE_LIMIT_MAX - Maximum requests per time window
  • LOG_LEVEL - Logging level (info, debug, error, etc.)

Frontend Configuration

  • VITE_API_URL - Backend API URL

πŸ›οΈ Architecture

Backend Architecture

The backend follows Fastify's recommended plugin-based architecture:

  • Plugin-based: Routes, middleware, and utilities are all Fastify plugins
  • Encapsulation: Each plugin is self-contained and testable
  • Type Safety: Full TypeScript support with TypeBox validation
  • Performance: Optimized for high throughput and low latency

Frontend Architecture

  • Feature-based: Organized by features rather than file types
  • Component-driven: Reusable UI components with Radix UI
  • State Management: TanStack Query for server state
  • Type Safety: Full TypeScript coverage

πŸ›‘οΈ Security Features

  • βœ… JWT-based authentication with refresh tokens
  • βœ… Multiple session support with session management
  • βœ… Role-based access control (RBAC)
  • βœ… Rate limiting on API endpoints
  • βœ… CORS protection
  • βœ… Security headers (Helmet)
  • βœ… Input validation and sanitization
  • βœ… SQL injection protection (Prisma)
  • βœ… Password strength validation
  • βœ… CSRF protection

πŸ“š API Documentation

Once the backend server is running, visit /docs to view the interactive API documentation powered by Swagger UI.

πŸ§ͺ Testing

# Run all tests
pnpm test

# Run tests for specific app
pnpm --filter backend test
pnpm --filter frontend test

🚒 Deployment

Fly.io

The project includes a fly.toml configuration file for deployment to Fly.io:

# Install Fly CLI and login
fly auth login

# Deploy
fly deploy

Other Platforms

The Docker setup can be adapted for deployment to:

  • AWS ECS/Fargate
  • Google Cloud Run
  • Azure Container Instances
  • DigitalOcean App Platform
  • Railway
  • Render

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘€ Author

Piyush Pradhan

πŸ™ Acknowledgments

  • Fastify team for the excellent framework
  • Prisma for the amazing ORM
  • React team for the powerful UI library
  • All the open-source contributors whose packages made this possible

Made with ❀️ for better project management

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages