This is the repo for the JustBecause Landing Page.
Clone the repository:
git clone https://github.com/justbecause/justbecause-landing.gitInstall dependencies:
npm installCreate environment variables:
cp .env.example .env.localEdit .env.local with your local environment overrides.
Run the development server:
npm run devRun the tests:
npm testnpm run dev: Start development server with Turbopacknpm run build: Create production buildnpm start: Start production servernpm run lint: Check for linting errorsnpm test: Run all Jest tests
.
├── .github/ # GitHub configuration
│ └── workflows/
│ └── ci.yaml # CI workflow
├── lib/ # Utility modules
│ ├── mailer.ts # Email sending module
│ ├── slackNotifier.ts # Slack notification module
│ ├── telegramNotifier.ts # Telegram notification module
│ ├── types.ts # TypeScript type definitions
│ ├── validation.ts # Validation utilities
│ └── __tests__/ # Tests for utility modules
├── public/ # Static assets
│ ├── _headers
│ ├── digitalocean.svg
│ ├── file.svg
│ ├── gcp.png
│ ├── globe.svg
│ ├── justbecauseph.png
│ ├── next.svg
│ ├── vercel.svg
│ └── window.svg
└── src/
└── app/ # Next.js app router
├── api/ # API routes
│ └── contact/
│ ├── route.ts # Contact form API route
│ └── __tests__/ # Tests for API route
├── components/ # Reusable components
│ ├── ContactForm.tsx # Contact form component
│ ├── ErrorBoundary.tsx
│ ├── Footer.tsx
│ ├── Header.tsx
│ ├── ScrollButton.tsx
│ └── ServiceCard.tsx
├── favicon.ico
├── globals.css # Global styles
├── layout.tsx # Root layout
├── page.tsx # Home page
├── robots.ts # Robots.txt configuration
└── sitemap.ts # Sitemap configuration
Create a .env.local file with:
# SMTP Configuration
SMTP_HOST=mail.test.ph
SMTP_PORT=587
SMTP_USER=mailer@test.ph
SMTP_PASS=test
CONTACT_EMAIL=info@test.ph
TURNSTILE_SECRET_KEY=test
# Notification Configuration
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXXX/XXX/XXXX
TELEGRAM_BOT_TOKEN=XXXX:XXXX
TELEGRAM_CHAT_ID=XXXX
# Next.js build settings
NEXT_PUBLIC_SITE_NAME="Site Name"
NEXT_PUBLIC_TURNSTILE_SITE_KEY=testThe application will automatically send notifications to Slack and Telegram when contact form submissions are successfully processed. To enable:
- For Slack: Create an incoming webhook and set
SLACK_WEBHOOK_URL - For Telegram: Create a bot via @BotFather and set
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID