Skip to content
Closed
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
28 changes: 28 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Environment Configuration Example
# Copy this file to .env.local and fill in your actual values

# Next.js Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME="stox.bg"
NEXT_PUBLIC_APP_DESCRIPTION="stox.bg – проект на Devids"

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here

# Analytics & Monitoring
NEXT_PUBLIC_GA_MEASUREMENT_ID=your_google_analytics_id_here
NEXT_PUBLIC_VERCEL_ANALYTICS_ID=your_vercel_analytics_id_here

# External APIs
NEXT_PUBLIC_NEWS_API_KEY=your_news_api_key_here
NEXT_PUBLIC_FINANCIAL_API_KEY=your_financial_api_key_here

# Security
NEXTAUTH_SECRET=your_nextauth_secret_here
NEXTAUTH_URL=http://localhost:3000

# Development
NODE_ENV=development
NEXT_TELEMETRY_DISABLED=1
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: CI/CD Pipeline

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

jobs:
lint-and-type-check:
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: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run TypeScript type check
run: npm run type-check

- name: Check Prettier formatting
run: npm run format:check

build-and-test:
name: Build and Test
runs-on: ubuntu-latest
needs: lint-and-type-check
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build
env:
NEXT_PUBLIC_APP_URL: https://stox.bg

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

deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build-and-test
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-files
path: .next/

- name: Deploy to Vercel Preview
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./

deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
needs: build-and-test
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Deploy to Vercel Production
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: '--prod'
working-directory: ./
127 changes: 123 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,131 @@ yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env.*.local

# vercel
# Vercel
.vercel

# typescript
# TypeScript
*.tsbuildinfo
next-env.d.ts

# IDE and Editor files
.vscode/
.idea/
*.swp
*.swo
*~

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

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.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/
out/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
public

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

# Docker
.dockerignore
Dockerfile.dev

# Database
*.sqlite
*.db

# Backup files
*.bak
*.backup
*.old

# Security
*.pem
*.key
*.crt
*.p12
*.pfx

# Analytics and monitoring
lighthouse-report.html
*.lighthouse.html

# Performance monitoring
.web-vitals.json
128 changes: 128 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Production builds
.next/
out/
build/
dist/

# Environment files
.env*

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

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

# Coverage directory used by tools like istanbul
coverage/

# 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/
out/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
public

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

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

# IDE files
.vscode/
.idea/

# Package lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# Generated files
*.tsbuildinfo
next-env.d.ts

# Vercel
.vercel

# Database
*.sqlite
*.db

# Backup files
*.bak
*.backup
*.old

# Security
*.pem
*.key
*.crt
*.p12
*.pfx

# Analytics and monitoring
lighthouse-report.html
*.lighthouse.html

# Performance monitoring
.web-vitals.json
Loading
Loading