Professional Web Development Service Platform with Client Portal
Features β’ Quick Start β’ Documentation β’ Contributing β’ License
JasaWeb is a comprehensive web development service platform that combines a marketing website with a powerful client portal. It's designed to streamline the process of delivering website development services for schools, news portals, and company profiles.
- Generate qualified leads for 3 main services: School Websites, News Portals, Company Profiles
- Accelerate client collaboration through an integrated Client Portal
- Standardize delivery processes to reduce project cycle time to 8-10 weeks
- Achieve 5-8% conversion from landing page to contact form
jasaweb/
βββ apps/
β βββ web/ # π¨ Astro marketing site
β βββ api/ # π§ NestJS client portal API
βββ packages/
β βββ ui/ # π Shared UI components
β βββ config/ # βοΈ Shared configurations
β βββ testing/ # π§ͺ Testing utilities
βββ docs/ # π Project documentation
βββ .github/ # π€ GitHub workflows & templates
βββ tests/ # π§ͺ Integration & E2E tests
| Component | Technology | Version |
|---|---|---|
| Frontend | Astro | ^4.0.0 |
| Backend | NestJS | ^10.0.0 |
| Database | PostgreSQL | 15+ |
| ORM | Prisma | ^6.16.3 |
| Language | TypeScript | ^5.0.0 |
| Package Manager | pnpm | ^8.15.0 |
| Styling | Tailwind CSS | ^4.1.17 |
| Testing | Vitest | ^1.0.0 |
| Container | Docker | Latest |
This project has been migrated from the deprecated @astrojs/tailwind integration to Tailwind CSS v4 with the native Vite plugin:
- Before: Used
@astrojs/tailwindintegration (deprecated) - After: Uses
@tailwindcss/viteplugin with Tailwind CSS v4 - Benefits: Better performance, smaller bundle size, latest Tailwind features
- Impact: No breaking changes - existing Tailwind classes continue to work
The migration includes:
- Updated
astro.config.mjsto use the Vite plugin - Updated CSS imports to use the new v4 syntax (
@import 'tailwindcss') - Removed dependency on the deprecated Astro integration
- Node.js 20+ (use
.nvmrcfor version consistency) - pnpm package manager (enable with
corepack enable) - Docker and Docker Compose for local development
- PostgreSQL 15+ (handled by Docker Compose)
- VS Code (recommended IDE with provided configuration)
-
Clone the repository
git clone https://github.com/sulhicmz/JasaWeb.git cd JasaWeb -
Setup Node.js and pnpm
# Install and use correct Node.js version nvm use # Enable pnpm corepack enable pnpm --version
-
Install dependencies
pnpm install
-
Environment setup
# Copy environment templates cp .env.example .env cp apps/api/.env.example apps/api/.env cp apps/web/.env.example apps/web/.env # Edit environment files with your configuration # See Environment Configuration section below
-
Start development services
# Start database and other services docker-compose up -d # Run database migrations pnpm db:migrate # Seed database (optional) pnpm db:seed
-
Start development servers
# Start all applications in development mode pnpm dev # Or start individual applications pnpm dev:web # Marketing site at http://localhost:4321 pnpm dev:api # API at http://localhost:3000
JasaWeb provides pre-configured VS Code settings for an optimal development experience:
-
Recommended Extensions: Install the recommended extensions by opening the command palette (Ctrl+Shift+P) and running "Extensions: Show Recommended Extensions"
-
Settings: The project includes pre-configured settings for:
- Auto-formatting on save
- ESLint integration
- TypeScript auto-imports
- Prisma syntax highlighting
- Debug configurations for both API and Web applications
-
Debugging: Use the pre-configured debug configurations:
- "Debug API" - Debug the NestJS API application
- "Debug Web" - Debug the Astro web application
-
Tasks: Run common development tasks directly from VS Code:
- "dev-api" - Start API in development mode
- "dev-web" - Start Web application in development mode
- "build-api" - Build API application
- "build-web" - Build Web application
- π Marketing Site: http://localhost:4321
- π§ API Documentation: http://localhost:3000/api
- ποΈ Database: localhost:5432 (via Docker)
- π API Health: http://localhost:3000/health
# Application
NODE_ENV=development
PORT=4321
# Database
DATABASE_URL=postgresql://postgres:password@localhost:5432/jasaweb
# Authentication
# SECURITY WARNING: Use cryptographically secure secrets in production (min 32 characters)
JWT_SECRET=your-super-secret-jwt-key
JWT_REFRESH_SECRET=your-super-secret-refresh-key
# External Services
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
# Storage
S3_BUCKET=jasaweb-storage
S3_REGION=us-east-1
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key# API Configuration
API_PORT=3000
API_PREFIX=api
# Security
BCRYPT_ROUNDS=12
SESSION_SECRET=your-session-secret
# Rate Limiting
RATE_LIMIT_TTL=60
RATE_LIMIT_MAX=100
# CORS
CORS_ORIGIN=http://localhost:4321# Site Configuration
SITE_URL=http://localhost:4321
SITE_NAME=JasaWeb
SITE_DESCRIPTION=Professional Web Development Services
# Analytics (optional)
GOOGLE_ANALYTICS_ID=
GOOGLE_TAG_MANAGER_ID=
# Contact Form
CONTACT_EMAIL=contact@jasaweb.com# Development
pnpm dev # Start all applications
pnpm dev:web # Start web application only
pnpm dev:api # Start API only
# Building
pnpm build # Build all applications
pnpm build:web # Build web application only
pnpm build:api # Build API only
# Testing
pnpm test # Run all tests
pnpm test:unit # Run unit tests only
pnpm test:e2e # Run end-to-end tests
pnpm test:coverage # Run tests with coverage
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format code with Prettier
pnpm typecheck # Run TypeScript checks
# Database
pnpm db:migrate # Run database migrations
pnpm db:generate # Generate Prisma client
pnpm db:seed # Seed database with sample data
pnpm db:studio # Open Prisma Studio
pnpm db:reset # Reset database
# Docker
pnpm docker:up # Start Docker services
pnpm docker:down # Stop Docker services
pnpm docker:logs # View Docker logs
# Development Tools
pnpm dev-tools:watch # Watch for file changes and reload
pnpm dev-tools:db # Database management tools
pnpm dev-tools:quality # Code quality toolsJasaWeb includes several development tools to improve productivity:
-
File Watcher: Automatically rebuild and reload applications when files change
# Watch all applications ./scripts/dev-tools/watch-and-reload.sh all # Watch API only ./scripts/dev-tools/watch-and-reload.sh api # Watch Web only ./scripts/dev-tools/watch-and-reload.sh web
-
Database Tools: Simplify database operations
# Reset database (WARNING: Deletes all data) ./scripts/dev-tools/database-tools.sh reset # Create new migration ./scripts/dev-tools/database-tools.sh migrate "migration-name" # Run pending migrations ./scripts/dev-tools/database-tools.sh up # Open Prisma Studio ./scripts/dev-tools/database-tools.sh studio # Generate Prisma client ./scripts/dev-tools/database-tools.sh generate
-
Code Quality Tools: Run checks and fix issues
# Run all code quality checks ./scripts/dev-tools/code-quality.sh all # Fix code issues ./scripts/dev-tools/code-quality.sh fix # Run specific check (lint, types, test, security, format) ./scripts/dev-tools/code-quality.sh check lint
tests/
βββ unit/ # Unit tests
βββ integration/ # Integration tests
βββ e2e/ # End-to-end tests
βββ fixtures/ # Test data and mocks
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test:coverage
# Run specific test file
pnpm test apps/api/src/auth/auth.service.spec.ts
# Run E2E tests
pnpm test:e2e- Minimum Coverage: 80%
- Critical Paths: 95%
- Unit Tests: All business logic
- Integration Tests: API endpoints
- E2E Tests: User workflows
POST /auth/login- User loginPOST /auth/register- User registrationPOST /auth/refresh- Refresh tokenPOST /auth/logout- User logout
GET /projects- List projects (summary view)GET /projects?view=detail- List projects (detailed view)POST /projects- Create projectGET /projects/:id- Get project detailsPUT /projects/:id- Update projectDELETE /projects/:id- Delete project
GET /health- Application health status
- Swagger UI: http://localhost:3000/api/docs
- OpenAPI Spec: http://localhost:3000/api/docs-json
| Environment | URL | Branch | Description |
|---|---|---|---|
| Development | dev.jasaweb.com | develop | Development testing |
| Staging | staging.jasaweb.com | main | Pre-production testing |
| Production | jasaweb.com | main/tags | Live production |
-
Automated Deployment (via GitHub Actions)
- Push to
developβ Deploy to Development - Push to
mainβ Deploy to Staging - Create release tag β Deploy to Production
- Push to
-
Cloudflare Pages Deployment
- Build command:
pnpm build:web - Build output directory:
apps/web/dist - Custom domains can be configured in Cloudflare dashboard
- Build command:
-
Manual Deployment (if needed)
# Build for production
pnpm build
# Build for Cloudflare Pages
cd apps/web && pnpm cf-build- Node.js 20+ runtime
- PostgreSQL 15+ database
- Redis for caching (optional)
- S3-compatible storage
- CDN for static assets
- Load balancer for high availability
The application uses PostgreSQL with Prisma ORM. Key configurations:
// prisma/schema.prisma
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}The application supports multi-tenancy via organization-based data isolation:
// Automatic tenant filtering
@MultiTenant() // Automatically adds organization_id filter
async findProjects() {
return this.prisma.project.findMany();
}- Project Summary Queries: Optimized
GET /projectsto return summary data by default - Aggregation Queries: Use Prisma aggregations for metrics calculation
- Multi-tenant Helper: Added reusable count helper for tenant-specific queries
- Connection Pooling: Optimized database connection management
- API Response Time: < 200ms (average)
- Database Query Time: < 50ms (average)
- Page Load Time: < 2s (First Contentful Paint)
- Build Time: < 2 minutes (full build)
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Conventional Commits
- Write tests for new features
- Update documentation for API changes
- Ensure all CI checks pass
- π Project Plan - Detailed specifications and roadmap
- π’ Client Management System - Complete system documentation
- π€ Agent Guidelines - Development conventions
- π§ Optimization Plan - Performance improvements
- π‘οΈ Security Policy - Security guidelines
- π Code of Conduct - Community guidelines
- βοΈ Cloudflare Pages Deployment - Deployment guide
# Check Docker containers
docker-compose ps
# Restart database
docker-compose restart postgres
# Check logs
docker-compose logs postgres# Clear pnpm cache
pnpm store prune
# Reinstall dependencies
rm -rf node_modules pnpm-lock.yaml
pnpm install# Clear build cache
pnpm clean
# Check TypeScript
pnpm typecheck
# Check linting
pnpm lint- π Documentation
- π Issue Tracker
- π¬ Discussions
- π§ Email Support
This project is licensed under the MIT License - see the LICENSE file for details.
- Astro - The modern web framework
- NestJS - Progressive Node.js framework
- Prisma - Next-generation ORM
- Tailwind CSS - Utility-first CSS framework
- pnpm - Fast, disk space efficient package manager
Built with β€οΈ by the JasaWeb Team
π Website β’ π§ Email β’ π¬ Discord