Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 39 additions & 40 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
# Dependencies
node_modules/
package-lock.json
yarn.lock

# Build output
dist/
build/

# Environment variables
.env
.env.local
.env.*.local

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Testing
coverage/
.nyc_output/

# Temporary files
tmp/
temp/
docs
# Dependencies
node_modules/
package-lock.json
yarn.lock

# Build output
dist/
build/

# Environment variables
.env.*.local

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Testing
coverage/
.nyc_output/

# Temporary files
tmp/
temp/
docs
config.bat
58 changes: 29 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
FROM node:20-alpine AS builder

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm ci

# Copy source code and build
COPY . .
RUN npm run build

# Production stage
FROM node:20-alpine

WORKDIR /app

# Install production dependencies only
COPY package*.json ./
RUN npm ci --only=production

# Copy built assets
COPY --from=builder /app/dist ./dist

# Expose port
EXPOSE 3000

# Start server
CMD ["node", "dist/server.js"]
FROM node:20-alpine AS builder
WORKDIR /app
# Install dependencies
COPY package*.json ./
RUN npm ci
# Copy source code and build
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Install production dependencies only
COPY package*.json ./
RUN npm ci --only=production
# Copy built assets
COPY --from=builder /app/dist ./dist
# Expose port
EXPOSE 3000
# Start server
CMD ["node", "dist/index.js"]
18 changes: 9 additions & 9 deletions jest.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

139 changes: 70 additions & 69 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,70 @@
{
"name": "hanoservices-backend",
"version": "1.0.0",
"description": "Backend API for HanoServices - Local Service Finder & Tracker Platform",
"main": "dist/index.js",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc && node scripts/copy-assets.js",
"start": "node dist/index.js",
"lint": "eslint src --ext .ts",
"test": "jest",
"db:migrate": "node dist/database/migrate.js",
"db:migrate:rollback": "node dist/database/migrate.js rollback",
"db:migrate:rollback-all": "node dist/database/migrate.js rollback-all",
"db:migrate:status": "node dist/database/migrate.js status",
"db:seed": "node dist/database/seed.js"
},
"keywords": [
"hanoservices",
"service-provider",
"booking",
"api"
],
"author": "",
"license": "ISC",
"dependencies": {
"@supabase/supabase-js": "^2.93.3",
"@types/express-rate-limit": "^5.1.3",
"axios": "^1.13.2",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"expo-server-sdk": "^3.7.0",
"express": "^4.18.2",
"express-rate-limit": "^8.2.1",
"express-validator": "^7.0.1",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
"node-cron": "^3.0.3",
"pg": "^8.11.3",
"pindo-sms": "^1.0.5",
"redis": "^4.7.1",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"twilio": "^5.12.0",
"winston": "^3.11.0"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^30.0.0",
"@types/jsonwebtoken": "^9.0.5",
"@types/multer": "^1.4.12",
"@types/node": "^20.10.5",
"@types/node-cron": "^3.0.11",
"@types/pg": "^8.10.9",
"@types/swagger-jsdoc": "^6.0.4",
"@types/swagger-ui-express": "^4.1.8",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.56.0",
"jest": "^30.2.0",
"ts-jest": "^29.4.6",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
}
}
{
"name": "hanoservices-backend",
"version": "1.0.0",
"description": "Backend API for HanoServices - Local Service Finder & Tracker Platform",
"main": "dist/index.js",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc && node scripts/copy-assets.js",
"start": "node dist/index.js",
"lint": "eslint src --ext .ts",
"test": "jest",
"db:migrate": "node dist/database/migrate.js",
"db:migrate:ts": "tsx src/database/migrate.ts",
"db:migrate:rollback": "node dist/database/migrate.js rollback",
"db:migrate:rollback-all": "node dist/database/migrate.js rollback-all",
"db:migrate:status": "node dist/database/migrate.js status",
"db:seed": "node dist/database/seed.js"
},
"keywords": [
"hanoservices",
"service-provider",
"booking",
"api"
],
"author": "",
"license": "ISC",
"dependencies": {
"@supabase/supabase-js": "^2.93.3",
"@types/express-rate-limit": "^5.1.3",
"axios": "^1.13.2",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"expo-server-sdk": "^3.7.0",
"express": "^4.18.2",
"express-rate-limit": "^8.2.1",
"express-validator": "^7.0.1",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"multer": "^1.4.5-lts.1",
"node-cron": "^3.0.3",
"pg": "^8.11.3",
"pindo-sms": "^1.0.5",
"redis": "^4.7.1",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"twilio": "^5.12.0",
"winston": "^3.11.0"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^30.0.0",
"@types/jsonwebtoken": "^9.0.5",
"@types/multer": "^1.4.12",
"@types/node": "^20.10.5",
"@types/node-cron": "^3.0.11",
"@types/pg": "^8.10.9",
"@types/swagger-jsdoc": "^6.0.4",
"@types/swagger-ui-express": "^4.1.8",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"eslint": "^8.56.0",
"jest": "^30.2.0",
"ts-jest": "^29.4.6",
"tsx": "^4.7.0",
"typescript": "^5.3.3"
}
}
Loading