Skip to content
Merged

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c9d47f9
fix: Correct text formatting in Shipping Policy Page
SanjeevSaniel Oct 7, 2025
ba3cb88
refactor(pricing): compact pricing cards, align buttons, and optimize…
SanjeevSaniel Dec 1, 2025
1904d9b
feat(landing): force light theme on all landing pages
SanjeevSaniel Dec 1, 2025
15669d8
style(contact): enforce light theme on input fields
SanjeevSaniel Dec 1, 2025
e3e58be
refactor(chat): enhance chat interface with compact, borderless desig…
SanjeevSaniel Dec 1, 2025
b9429ef
feat(history): redesign history page with compact grid layout
SanjeevSaniel Dec 1, 2025
be4cd3f
style(nav): fix hover colors for account menu
SanjeevSaniel Dec 1, 2025
1c89d04
style(ui): allow custom hover colors in dropdown menu
SanjeevSaniel Dec 1, 2025
5e0944e
fix(api): resolve linting issues in chat route
SanjeevSaniel Dec 1, 2025
ab176f8
chore(deps): update dependencies
SanjeevSaniel Dec 1, 2025
441448f
docs: update README
SanjeevSaniel Dec 1, 2025
2745c70
chore: remove obsolete documentation
SanjeevSaniel Dec 1, 2025
9b41021
chore(test): add vitest configuration and setup
SanjeevSaniel Dec 1, 2025
07bcf6d
test(utils): add unit tests for utility functions
SanjeevSaniel Dec 1, 2025
9ecbd80
feat(state): add zustand stores for global state management
SanjeevSaniel Dec 1, 2025
b09ee73
feat(validation): add zod schemas for data validation
SanjeevSaniel Dec 1, 2025
49c5af2
docs: add user guides and documentation
SanjeevSaniel Dec 1, 2025
43aa6b6
feat(service): add chat message service
SanjeevSaniel Dec 1, 2025
f113305
fix(api): update chat messages route
SanjeevSaniel Dec 1, 2025
6593ee7
feat(utils): add logger utility
SanjeevSaniel Dec 1, 2025
d2a74c9
refactor(structure): consolidate components into feature folders
SanjeevSaniel Dec 1, 2025
9c2e081
fix(components): resolve dynamic import types and remove unused Histo…
SanjeevSaniel Dec 1, 2025
dc0a798
feat: add lazy-loaded components with corresponding loading skeletons…
SanjeevSaniel Dec 1, 2025
e8a0f1a
fix(chat): resolve relative import paths in EnhancedChatInterface
SanjeevSaniel Dec 1, 2025
300311b
chore: remove orphaned sentry config files
SanjeevSaniel Dec 1, 2025
3b088f7
feat: add @sentry/nextjs dependency for error tracking.
SanjeevSaniel Dec 1, 2025
e437e09
feat: Add EnhancedStudioDemo component with a studio header and integ…
SanjeevSaniel Dec 1, 2025
d075185
feat: Implement billing and payment flow with Razorpay, and introduce…
SanjeevSaniel Dec 1, 2025
7164ffe
feat: Introduce a new hook for tracking user usage and plan limits.
SanjeevSaniel Dec 1, 2025
f2ca99c
feat: Implement payment provider abstraction, Drizzle ORM database se…
SanjeevSaniel Dec 1, 2025
4b15a4e
feat: add Vite, `@vitejs/plugin-react`, and `jsdom` to dev dependencies.
SanjeevSaniel Dec 1, 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
167 changes: 167 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: CI

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

env:
NODE_VERSION: '20'

jobs:
# Job 1: Code quality checks
lint:
name: Lint and Type Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run TypeScript type check
run: npx tsc --noEmit

# Job 2: Run tests
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm run test
env:
CI: true

- name: Upload coverage reports
uses: codecov/codecov-action@v4
if: success()
with:
file: ./coverage/coverage-final.json
flags: unittests
name: codecov-umbrella
continue-on-error: true

# Job 3: Build check
build:
name: Build Application
runs-on: ubuntu-latest
needs: [lint, test]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build
env:
# Mock environment variables for build
DATABASE_URL: postgresql://mock:mock@localhost:5432/mock
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_mock
CLERK_SECRET_KEY: sk_test_mock

- name: Check build output
run: |
if [ ! -d ".next" ]; then
echo "Build failed: .next directory not found"
exit 1
fi
echo "Build successful"

# Job 4: Database migrations check
migrations:
name: Check Database Migrations
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Check for migration conflicts
run: |
if [ -d "drizzle" ]; then
echo "Checking migration files..."
ls -la drizzle/
else
echo "No migrations directory found"
fi

# Job 5: Security audit
security:
name: Security Audit
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Run npm audit
run: npm audit --audit-level=moderate
continue-on-error: true

- name: Check for known vulnerabilities
run: |
npx audit-ci --moderate
continue-on-error: true

# Job 6: Notify on failure (optional)
notify:
name: Notify on Failure
runs-on: ubuntu-latest
needs: [lint, test, build]
if: failure()

steps:
- name: Send notification
run: |
echo "CI pipeline failed. Workflow: ${{ github.workflow }}"
echo "Commit: ${{ github.sha }}"
echo "Author: ${{ github.actor }}"
107 changes: 107 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Deploy

on:
push:
branches:
- main
workflow_dispatch:

env:
NODE_VERSION: '20'
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
# Deploy to Production
deploy-production:
name: Deploy to Production
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment:
name: production
url: ${{ steps.deploy.outputs.url }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
url=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})
echo "url=$url" >> $GITHUB_OUTPUT
echo "Deployed to: $url"

- name: Run database migrations
run: npm run db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
continue-on-error: true

- name: Deployment Summary
run: |
echo "### Deployment Successful! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Environment:** Production" >> $GITHUB_STEP_SUMMARY
echo "**URL:** ${{ steps.deploy.outputs.url }}" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "**Author:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY

# Deploy to Staging (on dev branch)
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/dev'
environment:
name: staging
url: ${{ steps.deploy.outputs.url }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "url=$url" >> $GITHUB_OUTPUT
echo "Deployed to: $url"

- name: Deployment Summary
run: |
echo "### Deployment Successful! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Environment:** Staging" >> $GITHUB_STEP_SUMMARY
echo "**URL:** ${{ steps.deploy.outputs.url }}" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
echo "**Author:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
Loading
Loading