Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1cf8ebf
Refactor: Modernize project structure with enhanced hooks, error hand…
cursoragent Jul 7, 2025
28bde7f
Merge branch 'main' into cursor/refactor-codebase-to-modern-standards…
kzndotsh Jul 7, 2025
a4b8de9
Fix media query, async data hooks, and add BugBot fixes documentation
cursoragent Jul 7, 2025
86ed399
Refactor ESLint config to flat config with Next.js best practices
cursoragent Jul 7, 2025
d8c732b
Enhance TypeScript configuration with strict types and Next.js 15 sup…
cursoragent Jul 7, 2025
2dd13ff
ci: add comprehensive CI/CD pipeline with Husky, lint-staged, and Git…
cursoragent Jul 7, 2025
49729c6
feat: enhance code quality tools and editor configuration
cursoragent Jul 7, 2025
78dbdd4
feat: update TypeScript configuration for Next.js 15 best practices
cursoragent Jul 7, 2025
5fe75a9
feat: comprehensive gitignore and environment configuration overhaul
cursoragent Jul 7, 2025
6a73a2b
feat: add pull request template for standardized contributions
cursoragent Jul 7, 2025
51a9852
style: format all source files with Prettier
cursoragent Jul 7, 2025
ab961c2
docs: add comprehensive CI/CD and configuration documentation
cursoragent Jul 7, 2025
baec30d
fix: update Husky hooks to modern format
cursoragent Jul 7, 2025
1aaf070
test: verify hooks work
cursoragent Jul 7, 2025
1ee2b16
chore: remove test file and deprecated Husky infrastructure
cursoragent Jul 7, 2025
a3dfa30
Merge main into refactor branch
cursoragent Jul 7, 2025
ffdce36
fix: resolve all TypeScript errors
cursoragent Jul 7, 2025
1a748a0
fix: resolve npm dependency conflict with nextjs-toploader
cursoragent Jul 7, 2025
2ac5ff1
chore: trigger CI rerun after formatting consistency check
cursoragent Jul 7, 2025
cb8f658
chore: trigger CI after utils.ts formatting fix
cursoragent Jul 7, 2025
559b003
chore: test CI formatting after import order correction
cursoragent Jul 7, 2025
8b48206
test: verify CI formatting after utils.ts recreation
cursoragent Jul 7, 2025
f29e3be
fix: remove Prettier import sorting to resolve CI inconsistencies
cursoragent Jul 7, 2025
ccb883c
fix: disable Prettier cache in CI to resolve formatting inconsistencies
cursoragent Jul 7, 2025
17a22f1
chore(commitlint): increase body-max-line-length to 500
kzndotsh Jul 7, 2025
0855e2b
refactor: replace `img` with `Image` component for optimized image ha…
kzndotsh Jul 7, 2025
1e31f68
feat(Markdown.tsx): allow custom image dimensions in Markdown component
kzndotsh Jul 7, 2025
bd89d61
refactor(logging): replace console.log with console.info for better l…
kzndotsh Jul 7, 2025
2269d15
refactor(configuration.ts): remove unused configuration processing fu…
kzndotsh Jul 7, 2025
e7789a1
refactor(configuration.ts): remove unused imports to clean up the cod…
kzndotsh Jul 7, 2025
8101eeb
refactor(chart.tsx): remove unused chart component to streamline code…
kzndotsh Jul 7, 2025
6cc351f
chore(eslint): update ESLint configuration for better compatibility
kzndotsh Jul 7, 2025
67f5dae
fix(utils): date error
ThisCatLikesCrypto Jul 7, 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
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

# Matches multiple files with brace expansion notation
[*.{js,jsx,ts,tsx,json,css,scss,yml,yaml}]
indent_size = 2

# Markdown files
[*.md]
trim_trailing_whitespace = false

# Package files
[package.json]
indent_size = 2

# YAML files
[*.{yml,yaml}]
indent_size = 2

# Makefile
[Makefile]
indent_style = tab
70 changes: 68 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,73 @@
# Base64 Encoded Service Account JSON
# ================================================================
# Application Configuration
# ================================================================
# Node environment: development, production, test
NODE_ENV=development

# ================================================================
# Next.js Configuration
# ================================================================
# Public URL of your application
NEXT_PUBLIC_APP_URL=http://localhost:3000

# API URL (if different from app URL)
NEXT_PUBLIC_API_URL=http://localhost:3000/api

# Site name for SEO and metadata
NEXT_PUBLIC_SITE_NAME="Next.js App"

# ================================================================
# Google Drive Configuration
# ================================================================
# Base64 encoded service account credentials
GD_SERVICE_B64=
# Secret Key for Encryption

# Encryption key for secure operations
ENCRYPTION_KEY=

# ================================================================
# Database Configuration (if applicable)
# ================================================================
# DATABASE_URL=postgresql://user:password@localhost:5432/dbname

# ================================================================
# Authentication (if applicable)
# ================================================================
# JWT_SECRET=
# AUTH_SECRET=

# ================================================================
# External Services (if applicable)
# ================================================================
# Analytics
# NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
# NEXT_PUBLIC_MIXPANEL_TOKEN=

# Error Tracking
# SENTRY_DSN=
# NEXT_PUBLIC_SENTRY_DSN=

# Email Service
# SMTP_HOST=
# SMTP_PORT=
# SMTP_USER=
# SMTP_PASSWORD=

# ================================================================
# Feature Flags (if applicable)
# ================================================================
# NEXT_PUBLIC_ENABLE_FEATURE_X=false
# NEXT_PUBLIC_ENABLE_BETA_FEATURES=false

# ================================================================
# Development Tools
# ================================================================
# Enable debug logging
# DEBUG=true

# Disable Next.js telemetry
NEXT_TELEMETRY_DISABLED=1

# Index password, used when private mode is enabled
SITE_PASSWORD=

Expand Down
35 changes: 35 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Description

Please include a summary of the changes and which issue is fixed. Include relevant motivation and context.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring

## Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Screenshots (if applicable)

Please add screenshots to help explain your changes.

## Additional context

Add any other context about the pull request here.
161 changes: 161 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: CI

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

env:
NODE_VERSION: "20.x"

jobs:
lint:
name: Lint
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: Check Prettier formatting
run: npm run format:check

type-check:
name: 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 TypeScript type check
run: npm run type-check

build:
name: Build
runs-on: ubuntu-latest
needs: [lint, type-check]
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:
NEXT_TELEMETRY_DISABLED: 1

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: .next
retention-days: 7

test:
name: Test
runs-on: ubuntu-latest
needs: [lint, type-check]
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

# Uncomment when tests are added
# - name: Run unit tests
# run: npm test

# - name: Run integration tests
# run: npm run test:integration

# - name: Upload coverage reports
# uses: codecov/codecov-action@v4
# with:
# file: ./coverage/coverage-final.json
# flags: unittests
# name: codecov-umbrella

security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

lighthouse:
name: Lighthouse CI
runs-on: ubuntu-latest
needs: build
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: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: .next

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
http://localhost:3000
uploadArtifacts: true
temporaryPublicStorage: true
continue-on-error: true
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CodeQL

on:
push:
branches: [main, develop]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 1" # Weekly on Monday

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript", "typescript"]

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
19 changes: 19 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependency Review

on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
fail-on-severity: moderate
Loading
Loading