Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
pull_request:
push:
branches:
- main
- master

permissions:
contents: read

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 10.33.4

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run checks
run: pnpm check

- name: Install Chromium
run: pnpm exec playwright install --with-deps chromium

- name: Run browser tests
run: pnpm test:e2e
78 changes: 78 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Deploy to GitHub Pages

on:
workflow_run:
workflows:
- CI
types:
- completed

permissions:
contents: read

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
if: >-
${{
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
(github.event.workflow_run.head_branch == 'main' ||
github.event.workflow_run.head_branch == 'master')
}}
runs-on: ubuntu-latest
permissions:
contents: read
pages: read
steps:
- name: Check out the verified revision
uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 10.33.4

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build the verified revision
run: pnpm build

- name: Verify static output
run: pnpm verify:build

- name: Configure GitHub Pages
uses: actions/configure-pages@v6

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/
dist/
coverage/
playwright-report/
test-results/
.DS_Store
*.log
tmp/
.visualizations/
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
90 changes: 90 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Agent Instructions — Lucas Mariz Portfolio

## Scope and source of truth

- These instructions apply to every coding agent working in this repository.
- Read `docs/ENGINEERING_CONVENTIONS.md`, `docs/DESIGN.md`, and the relevant
roadmap phase before implementation.
- Keep implementation, tests, and documentation synchronized in the same
change.
- Read the nearest nested `AGENTS.md` before editing a scoped module. Nested
instructions may add invariants without replacing these repository-wide
rules.

## Language policy

- Write source code, code comments, test descriptions, commit-facing notes,
README content, agent instructions, and technical documentation in English.
- Never hardcode user-facing copy in a component. Add it to the typed i18n
catalog in English, Brazilian Portuguese, and French.
- English is the application fallback locale.

## Tooling

- Node.js 24 is required. Keep `.nvmrc`, `.node-version`, CI, and
`package.json` aligned.
- pnpm is the only package manager. Use `pnpm`, `pnpm exec`, and `pnpm dlx`;
never add npm or Yarn commands to project documentation or scripts.
- Biome is the only JavaScript/TypeScript/CSS linter and formatter. The root
`biome.json` is the single source of truth.
- Run `pnpm check` before handing off an implementation change. Run the
production build and relevant browser checks when UI or deployment changes.

## Git and commits

- Commit messages must be written in English and follow Conventional Commits.
- Never run `git commit` unless the user explicitly asks for a commit in the
current conversation. Permission to plan, implement, edit, test, or prepare
a change is not permission to commit it.
- Commit authorization applies only to changes the user has already reviewed.
Any later edit requires a new review and a new explicit commit request.
- Lefthook must run the configured pre-commit checks, and Commitlint must
validate commit messages. Never bypass hooks with `--no-verify`.

## TypeScript and control flow

- Do not use `let`, `else`, `else if`, or `switch` in TypeScript or JavaScript.
- Prefer arrow functions for Preact components and helpers.
- Prefer immutable values, guard clauses, early returns, lookup maps, and small
named helpers.
- Keep components presentational where possible and move content, browser
preference detection, and external-data logic into dedicated modules.

## Components and responsive design

- Keep files focused. Split large sections into small, named components.
- Every reusable component belongs in a PascalCase folder with a matching
`Component.tsx` file, an `index.ts` barrel, and focused tests when it owns
behavior.
- A component used by only one parent belongs in that parent's
`components/ComponentName/` folder with the same file/barrel structure.
- Import components through their folder barrels.
- Treat mobile and desktop as first-class layouts. Avoid horizontal overflow,
preserve accessible touch targets, and verify representative phone and
desktop viewports.
- Use semantic design tokens for every surface, border, foreground, and state
so light and dark themes remain visually equivalent.
- Add only purposeful transitions and always respect `prefers-reduced-motion`.

## Internationalization and theme

- Supported locales are `en`, `pt-BR`, and `fr`, with matching catalog keys.
- On a first visit, detect the browser locale. If it is missing or unsupported,
use English.
- On a first visit, detect `prefers-color-scheme`. If it is missing or
unsupported, use light mode.
- Persist explicit user overrides and apply theme selection before first paint.
- Update the document language and localized metadata whenever the locale
changes.
- Language controls must use language names rather than flags alone.

## Static deployment and public data

- The site must remain statically buildable for GitHub Pages. Do not introduce
a backend, server runtime, or client-side secret for portfolio features.
- The GitHub avatar may use the public username image endpoint with a local
fallback.
- Keep the project showcase curated. External APIs may enrich nonessential
metadata at build time, but the page must not depend on runtime API success.
- Never expose private repository URLs, credentials, tokens, residential
addresses, or other unnecessary personal data in the generated site.
109 changes: 107 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,107 @@
# Curriculum
Currículo : https://lucaspmm.github.io/Curriculum/
# Lucas Mariz Portfolio

A small, static personal portfolio for GitHub Pages. It presents Lucas Mariz's
professional experience, academic path, selected production work, research, and
projects in English, Brazilian Portuguese, and French.

Target production URL: [https://lucaspmm.github.io/](https://lucaspmm.github.io/)

The curated showcase includes Jig Solver, the private Planner financial
assistant, Simplex, Pokémon Base, Greedy K-means, and LZ78 Compression. Private
projects are described without exposing source or application links.

## Stack

- Preact, TypeScript, and Vite
- i18next with typed, key-parity translation catalogs
- Native CSS based on the tokens in `docs/DESIGN.md`
- Biome for linting and formatting
- Vitest and Testing Library for behavior tests
- Playwright for responsive browser checks
- Vite prerendering for useful HTML before client hydration
- Lefthook and Commitlint for local Git conventions

The site has no backend, CMS, or client-side secret. The profile image loads
from the public GitHub username endpoint and falls back to a local asset.

## Requirements

- Node.js 24
- pnpm 10

## Local development

```bash
pnpm install
pnpm dev
```

Install the Git hooks once per clone:

```bash
pnpm exec lefthook install
```

## Quality checks

```bash
pnpm check
```

Run the browser suite separately after installing the Playwright browser:

```bash
pnpm exec playwright install chromium
pnpm test:e2e
```

## Production build

```bash
pnpm build
pnpm preview
```

The build output is written to `dist/`. This repository targets the
`LucasPMM.github.io` GitHub Pages user site and therefore uses `/` as its Vite
base path.

The production check also verifies canonical metadata, the sitemap,
`robots.txt`, and representative prerendered content.

## GitHub Pages activation

The deployment workflow runs only after the `CI` workflow succeeds for a push
to `master` or `main`. It rebuilds the exact verified revision and publishes
only `dist/`.

To activate the final site:

1. Rename `LucasPMM/Curriculum` to `LucasPMM/LucasPMM.github.io` under
**Settings → General**.
2. Under **Settings → Pages**, change the publishing source from the legacy
branch configuration to **GitHub Actions**.
3. Update the local remote:

```bash
git remote set-url origin git@github.com:LucasPMM/LucasPMM.github.io.git
```

4. Merge the modernization branch into the default branch. A successful CI run
will trigger the deployment workflow automatically.
5. Set the repository description, Website field, GitHub profile Website, and
LinkedIn link to `https://lucaspmm.github.io/`.

## Content and implementation rules

Read these files before making changes:

- `AGENTS.md`
- `docs/ENGINEERING_CONVENTIONS.md`
- `docs/DESIGN.md`
- `docs/ROADMAP.md`

Source code, comments, tests, and documentation are written in English. All
visitor-facing copy belongs in the three-language catalog. Do not commit changes
without explicit authorization from Lucas; authorized messages must follow
English Conventional Commits.
41 changes: 41 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
"files": {
"includes": [
"**",
"!!dist",
"!!coverage",
"!!node_modules",
"!!playwright-report",
"!!test-results",
"!!tmp",
"!!.visualizations"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "all"
}
},
"css": {
"formatter": {
"enabled": true
},
"linter": {
"enabled": true
}
}
}
3 changes: 3 additions & 0 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
extends: ['@commitlint/config-conventional'],
}
Loading