8000 fabio7maia (Fábio Maia) · GitHub
[go: up one dir, main page]

Skip to content
View fabio7maia's full-sized avatar
🏠
Working from home
🏠
Working from home

Block or report fabio7maia

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
fabio7maia/README.md

Fábio — Personal Landing Page

Premium personal landing page built with Next.js 15 + Payload CMS 3.x, featuring bilingual support (PT + EN), a technical blog, case studies, and a command palette.

Tech Stack

Area Technology
Framework Next.js 15 (App Router)
CMS Payload CMS 3.x (embedded)
Database PostgreSQL 16
Styling Tailwind CSS 4.x
Animations Framer Motion 11.x
i18n next-intl 3.x
Email Resend
Analytics Umami (self-hosted)
Testing Vitest + Playwright
Deploy Railway

Local Setup

Prerequisites

  • Node.js ≥ 20
  • pnpm ≥ 9
  • Docker + Docker Compose (for local PostgreSQL)

1. Clone and install

git clone <repo-url>
cd fabio-landing
pnpm install

2. Configure environment

cp .env.example .env.local
# Edit .env.local with your values

3. Start local database

docker-compose up db -d

4. Run migrations and generate types

pnpm migrate
pnpm generate:types
pnpm generate:importmap

5. Start the dev server

pnpm dev

Site: http://localhost:3000/pt Admin: http://localhost:3000/admin


Available Commands

Command Description
pnpm dev Start development server
pnpm build Production build
pnpm start Start production server
pnpm lint Run ESLint
pnpm format Format with Prettier
pnpm type-check TypeScript type check
pnpm test Run unit tests
pnpm test:coverage Unit tests with coverage
pnpm test:e2e Run Playwright E2E tests
pnpm migrate Run Payload DB migrations
pnpm generate:types Generate Payload TypeScript types
pnpm generate:importmap Regenerate Payload admin import map

Environment Variables

Variable Required Description
DATABASE_URI ✅ PostgreSQL connection string
PAYLOAD_SECRET ✅ Payload CMS encryption secret (min 32 chars)
NEXT_PUBLIC_SITE_URL ✅ Public base URL of the site
RESEND_API_KEY ✅ Resend API key for transactional email
RESEND_FROM_EMAIL ✅ Sender email address
NOTIFICATION_EMAIL ✅ Email to receive contact form notifications
NEXT_PUBLIC_UMAMI_WEBSITE_ID ❌ Umami analytics website ID
NEXT_PUBLIC_UMAMI_URL ❌ Umami instance URL

Set these in Railway via the environment variable UI. For local dev, use .env.local.

See .env.example for a template with all variables and example values.


Architecture

src/
├── app/
│   ├── (frontend)/[locale]/    # Public site (PT + EN)
│   ├── (payload)/admin/        # Payload CMS admin panel
│   └── api/                    # REST endpoints + health check
├── collections/                # Payload CMS collection configs
├── globals/                    # Payload global configs
├── blocks/                     # Payload content blocks
├── components/                 # React components
├── i18n/                       # Internationalization config + messages
└── lib/                        # Shared utilities

Deployment

Railway

  1. Create a Railway project with PostgreSQL service
  2. Connect your GitHub repository to a web service
  3. Set environment variables in Railway dashboard
  4. Auto-deploy triggers on push to main

Health check: GET /api/health Build command: pnpm build Start command: node .next/standalone/server.js

Staging

Push to main triggers a production deploy. For staging, create a separate Railway environment connected to a staging branch.


Content Management

Access the Payload admin panel at /admin. Create your first admin user on first visit.

Collections:

  • Pages — Homepage content blocks
  • Case Studies — Project case studies with metrics
  • Posts — Blog posts with categories and tags
  • Categories / Tags — Blog taxonomy
  • Contact Submissions — Form submissions (read-only)
  • Media — Image library with auto-generated sizes

Globals:

  • Site Settings — Site-wide configuration (title, social links, navigation)

Testing

Unit tests

pnpm test              # Run all unit tests
pnpm test:coverage     # Run with v8 coverage report (threshold: 80%)

Coverage scope: src/lib/**, src/utils/**, src/hooks/**

E2E tests (Playwright)

Requires a running application (or pnpm build && pnpm start).

pnpm test:e2e          # Run all Playwright tests (headless)
pnpm test:e2e:ui       # Run with Playwright UI mode

E2E tests cover:

  • Homepage load in PT and EN locales
  • Locale switching (PT ↔ EN)
  • Navigation (blog, case studies, contact)
  • Contact form rendering and validation
  • Command palette (keyboard shortcut ⌘K / Ctrl+K)
  • 404 not-found page
  • Accessibility (heading hierarchy, alt texts, focus management)
  • Security headers (CSP, X-Frame-Options, HSTS, etc.)
  • RSS feed (/feed.xml) and sitemap (/sitemap.xml)

Set PLAYWRIGHT_BASE_URL to run against a non-localhost server.

Pinned Loading

  1. reactjs-webinar-shared-components reactjs-webinar-shared-components Public

    TypeScript 3

  2. react-flow-app react-flow-app Public

    🚀 This is a React.js library to simplify navigations focused in events (user actions) for smooth integrations.

    TypeScript 5

  3. react-light-form react-light-form Public

    This is a react.js library to improve and simplify form management

    JavaScript 2

  4. microfrontend-app-reactjs microfrontend-app-reactjs Public template

    TypeScript 2

  5. play-and-learn play-and-learn Public

    TypeScript 2

0