Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged

Dev #92

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a414391
feat: implement user dashboard API and hook for fetching dashboard data
RandithaK Aug 16, 2025
7554d77
feat: update dashboard translations and loading states for user greet…
RandithaK Aug 16, 2025
4e41f79
Merge pull request #83 from XFire2025/User-page-fix
RandithaK Aug 16, 2025
49f3256
feat: add sign up option to navigation in multiple languages
renulucshmi Aug 16, 2025
7dc24f2
feat: Enhance Department Analytics Dashboard with new tabs and dummy …
AdeepaK2 Aug 16, 2025
54ab98f
Merge branch 'Dev' into Api-Adeepa
AdeepaK2 Aug 16, 2025
ecd79df
Merge branch 'Dev' of https://github.com/XFire2025/govlink into Api-A…
AdeepaK2 Aug 16, 2025
f46a89c
Merge branch 'Api-Adeepa' of https://github.com/XFire2025/govlink int…
AdeepaK2 Aug 16, 2025
05b7373
Merge pull request #85 from XFire2025/Api-Adeepa
AdeepaK2 Aug 16, 2025
9c185f0
Merge branch 'Dev' of https://github.com/XFire2025/govlink into renu-bot
renulucshmi Aug 16, 2025
10349d5
Merge pull request #84 from XFire2025/renu-bot
renulucshmi Aug 16, 2025
7e682a3
Add flower icon SVG with layered petals and center details
AdeepaK2 Aug 16, 2025
592bbde
Merge branch 'Dev' into Api-Adeepa
AdeepaK2 Aug 16, 2025
d23cce0
Merge pull request #86 from XFire2025/Api-Adeepa
AdeepaK2 Aug 16, 2025
faaa5ca
feat: Implement booking conversation flow in RAGBot
nethmalgunawardhana Aug 16, 2025
4ddd68e
Enhance email service configuration and add health check API
RandithaK Aug 16, 2025
1983602
Update README.md
AdeepaK2 Aug 16, 2025
c755192
Merge pull request #88 from XFire2025/AdeepaK2-patch-1
AdeepaK2 Aug 16, 2025
ec1c9f0
Add User Help and Settings pages with multilingual support
renulucshmi Aug 16, 2025
c80d39e
Merge branch 'Dev' of https://github.com/XFire2025/govlink into renu-bot
renulucshmi Aug 16, 2025
8229387
Merge branch 'Dev' into feat/ragbot-booking-integration
nethmalgunawardhana Aug 16, 2025
de35e5e
Merge pull request #89 from XFire2025/feat/ragbot-booking-integration
nethmalgunawardhana Aug 16, 2025
4573b54
Implement user settings API with GET and PUT methods for managing pre…
renulucshmi Aug 16, 2025
a449e5c
Merge branch 'Dev' of https://github.com/XFire2025/govlink into renu-bot
renulucshmi Aug 16, 2025
8ae298d
Refactor user settings API and UI for consistency in error messages a…
renulucshmi Aug 16, 2025
fdba9ed
Merge pull request #90 from XFire2025/renu-bot
renulucshmi Aug 16, 2025
3cc5087
Merge branch 'Dev' into Docker
RandithaK Aug 16, 2025
81ff20c
Merge pull request #87 from XFire2025/Docker
RandithaK Aug 16, 2025
6279453
Merge branch 'main' into Dev
RandithaK Aug 16, 2025
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
132 changes: 132 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Next.js
.next/
out/

# Build outputs
dist
build

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# public - We need this for Next.js

# Vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

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

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Git
.git
.gitignore

# Docker
Dockerfile*
docker-compose*
.dockerignore

# Documentation
README.md
*.md

# Test files
__tests__/
**/*.test.js
**/*.test.ts
**/*.spec.js
**/*.spec.ts

# Scripts (migration scripts might contain sensitive data)
scripts/
61 changes: 61 additions & 0 deletions DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# GovLink Docker Setup

This is a simple Docker setup for the GovLink Next.js application using MongoDB Atlas.

## Prerequisites

- Docker and Docker Compose installed
- MongoDB Atlas account and connection string
- Environment variables configured

## Quick Start

1. **Copy environment variables:**
```bash
cp .env.example .env
```

2. **Edit the `.env` file with your actual values:**
- `MONGODB_URI`: Your MongoDB Atlas connection string
- `JWT_SECRET` and `JWT_REFRESH_SECRET`: Strong secret keys
- `R2_ACCESS_KEY_ID` and `R2_SECRET_ACCESS_KEY`: Cloudflare R2 credentials
- `OPENAI_API_KEY`: Your OpenAI API key
- `TAVILY_API_KEY`: Your Tavily search API key
- Email configuration for SMTP

3. **Build and run the application:**
```bash
docker-compose up --build
```

4. **Access the application:**
- Application: http://localhost:3000
- Health check: http://localhost:3000/api/health

## Environment Variables

The main environment variables you need to configure:

```env
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/govlink?retryWrites=true&w=majority
JWT_SECRET=your-super-secret-jwt-key
JWT_REFRESH_SECRET=your-super-secret-refresh-key
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_access_key
OPENAI_API_KEY=your_openai_api_key
TAVILY_API_KEY=your_tavily_api_key
```

## Commands

- **Build and start:** `docker-compose up --build`
- **Start in background:** `docker-compose up -d`
- **Stop:** `docker-compose down`
- **View logs:** `docker-compose logs -f`
- **Rebuild:** `docker-compose build --no-cache`

## Notes

- The application uses MongoDB Atlas, so no local database is included
- The Docker image is optimized for production with Next.js standalone output
- Health checks are included to monitor application status
50 changes: 50 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Simple Dockerfile for GovLink Next.js Application

FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat curl
WORKDIR /app

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

# Build the application
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ENV NEXT_TELEMETRY_DISABLED 1
ENV SKIP_DB_VALIDATION true

RUN npm run build

# Production image
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
RUN apk add --no-cache curl

# Copy public directory first
COPY public ./public

# Copy the built application
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV HOSTNAME "0.0.0.0"

CMD ["node", "server.js"]
Loading