Skip to content

dimastriann/full-stack-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Full Stack TypeScript Project Management App

A modern full-stack project management application built with TypeScript, featuring a NestJS GraphQL backend and React frontend with real-time collaboration capabilities.

πŸš€ Technology Stack

Backend

  • Framework: NestJS (Node.js framework)
  • API: GraphQL with Apollo Server
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT with Passport and bcrypt
  • Language: TypeScript
  • Testing: Jest

Frontend

  • Framework: React 19 with TypeScript
  • Build Tool: Vite
  • Styling: Vanilla CSS (Premium Aesthetics) & TailwindCSS
  • State Management: React Context & Zustand
  • GraphQL Client: Apollo Client
  • Routing: React Router DOM (with protected routes)

πŸ“‹ Features

  • Advanced ACL System: Granular project-level roles (Owner, Admin, Member, Viewer) with inherited permissions.
  • Global RBAC: System-wide roles (Admin, Manager, User) protecting administrative dashboards.
  • Dynamic Dashboard: Real-time aggregate statistics for users, projects, and tasks.
  • User Registration: Seamless signup flow with automatic authentication.
  • Task Management: Kanban-style boards with drag-and-drop (permission-aware).
  • Collaboration: Nested commenting system and multi-level attachments.
  • Time Tracking: Log and manage time spent across entities.

πŸ› οΈ Development Setup

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Git

Installation

  1. Clone the repository
git clone <repository-url>
cd full-stack-typescript
  1. Install root dependencies
npm install
  1. Backend Setup
cd backend
npm install

# Generate Prisma client
npx prisma generate

# Run database migrations
npx prisma migrate dev

# Start the backend server (development mode)
npm run start:dev
  1. Frontend Setup
cd frontend
npm install

# Start the frontend development server
npm run dev

Database Setup

The application uses PostgreSQL with Prisma ORM. Ensure you have a running PostgreSQL instance and configure your .env file with the correct DATABASE_URL.

# Navigate to backend directory
cd backend

# Generate Prisma client
npx prisma generate

# Apply migrations
npx prisma migrate dev

# (Optional) Seed the database with sample data
npx prisma db seed

πŸš€ Running the Application

Development Mode

  1. Start Backend (Terminal 1)
cd backend
npm run start:dev

Backend will be available at: http://localhost:3000 GraphQL Playground: http://localhost:3000/graphql

  1. Start Frontend (Terminal 2)
cd frontend
npm run dev

Frontend will be available at: http://localhost:5173

Production Mode

  1. Build and start backend
cd backend
npm run build
npm run start:prod
  1. Build and preview frontend
cd frontend
npm run build
npm run preview

πŸ“ Project Structure

full-stack-typescript/
β”œβ”€β”€ backend/                 # NestJS GraphQL API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ user/           # User management module
β”‚   β”‚   β”œβ”€β”€ project/        # Project management module
β”‚   β”‚   β”œβ”€β”€ task/           # Task management module
β”‚   β”‚   β”œβ”€β”€ timesheet/      # Time tracking module
β”‚   β”‚   β”œβ”€β”€ comment/        # Comments system module
β”‚   β”‚   β”œβ”€β”€ project-member/ # ACL & Membership module
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Statistics & Aggregates module
β”‚   β”‚   └── prisma/         # Database service
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   β”œβ”€β”€ schema.prisma   # Database schema
β”‚   β”‚   └── migrations/     # Database migrations
β”‚   └── dev.db             # SQLite database
β”œβ”€β”€ frontend/               # React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ features/       # Feature-based modules
β”‚   β”‚   β”‚   β”œβ”€β”€ projects/   # Project management
β”‚   β”‚   β”‚   β”œβ”€β”€ tasks/      # Task management
β”‚   β”‚   β”‚   └── users/      # User management
β”‚   β”‚   β”œβ”€β”€ context/        # React context providers
β”‚   β”‚   β”œβ”€β”€ hooks/          # Custom React hooks
β”‚   β”‚   └── types/          # TypeScript type definitions
β”‚   └── public/             # Static assets
└── README.md

πŸ”§ Available Scripts

Backend Scripts

npm run start:dev      # Start development server with hot reload
npm run start:debug    # Start with debugging enabled
npm run build          # Build for production
npm run start:prod     # Start production server
npm run test           # Run unit tests
npm run test:e2e       # Run end-to-end tests
npm run lint           # Run ESLint
npm run format         # Format code with Prettier

Frontend Scripts

npm run dev            # Start development server
npm run build          # Build for production
npm run preview        # Preview production build
npm run lint           # Run ESLint
npm run format         # Format code with Prettier

πŸ—„οΈ Database Schema

The application includes the following main entities:

  • User: User accounts with roles (Admin, Manager, User)
  • Project: Projects with status tracking
  • Task: Tasks assigned to users and projects
  • Timesheet: Time tracking entries
  • Comment: Collaborative commenting system

πŸ” Authentication & Authorization

  • Password hashing with bcrypt
  • Role-based access control (Admin, Manager, User)
  • JWT tokens for session management
  • Protected routes and API endpoints

πŸ§ͺ Testing

# Backend tests
cd backend
npm run test           # Unit tests
npm run test:e2e       # End-to-end tests
npm run test:cov       # Coverage report

# Frontend tests
cd frontend
npm run test           # Component tests

πŸ“ API Documentation

The GraphQL API is automatically documented and available at:

  • Development: http://localhost:3000/graphql
  • GraphQL Playground: Interactive API explorer

🀝 Contributing

  1. Fork the repository
  2. Create a 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.

πŸ†˜ Troubleshooting

Common Issues

  1. Database connection issues

    • Ensure SQLite database file exists
    • Run npx prisma migrate dev to apply migrations
  2. GraphQL connection issues

    • Verify backend is running on port 3000
    • Check CORS settings in main.ts
  3. Frontend build issues

    • Clear node_modules and reinstall: rm -rf node_modules && npm install
    • Check TypeScript configuration

Getting Help

  • Check the Issues page
  • Review the GraphQL Playground for API documentation
  • Ensure all dependencies are properly installed

Happy Coding! πŸš€

About

Full Stack Typescript Development with NestJS + GraphQL + Sqlite/Postgresql (Backend) and ReactJS + Vite + TailwindCSS (Frontend) : Simple Project Management App

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages