Skip to content

darkmoonight/darkmoonight.github.io

Repository files navigation

DARK NIGHT

Bilingual team portfolio with an IDE/terminal UI. Astro 6 + Tailwind CSS 4.

Development

Node.js β‰₯ 22.12.0

npm install
npm run dev       # http://localhost:4321
npm run build     # dist/
npm run preview
npm run ci        # typecheck, i18n, lint, format

Other scripts: build:pages, validate:i18n, lint:fix, format. Husky runs ci on commit.

Configuration

Copy .env.example β†’ .env.

Variable Purpose
GITHUB_TOKEN GitHub API access (recommended for builds and live stats)
PUBLIC_WEB3FORMS_ACCESS_KEY Contact form (Web3Forms); omitted in dev = mock submit
FORCE_GITHUB_SYNC 1 β€” bypass snapshot cache TTL
ASTRO_SITE / ASTRO_BASE Site URL and path prefix (CI sets these for Pages)

Build-time GitHub data is cached in .cache/github-snapshot.json; the client can refresh stars, languages, and releases in the browser.

Structure

src/
β”œβ”€β”€ components/     sections, layout, phone mockups
β”œβ”€β”€ constants/      site, GitHub, DOM ids
β”œβ”€β”€ data/           projects, translations, mockups, team
β”œβ”€β”€ integrations/   build hooks (GitHub cache)
β”œβ”€β”€ pages/          routes (/en, /ru, project detail)
β”œβ”€β”€ styles/
└── utils/

Content lives in src/data/ (projects.json, translations.json, project-mockups.json). Branding and org settings: src/constants/site.ts, src/constants/github.ts.

i18n

Routes: /en/ and /ru/ (/ β†’ /en/). UI strings: src/data/translations.json. Check keys with npm run validate:i18n.

Deploy

.github/workflows/deploy.yml builds on push to main/master (and daily cron) and publishes to GitHub Pages via Actions.

  1. Settings β†’ Pages β†’ Source: GitHub Actions
  2. Optional repo secrets: PUBLIC_WEB3FORMS_ACCESS_KEY
  3. GITHUB_TOKEN is provided in Actions automatically

Local Pages smoke: npm run build:pages.

License

Open source β€” darkmoonight.