diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2bb0eea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + - master + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + quality-gate: + name: Typecheck, Test, Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Typecheck + run: npx tsc --noEmit + + - name: Test + run: CI=true yarn test --watchAll=false + + - name: Build + run: yarn build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3d6dee --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release + +on: + push: + tags: + - '*' + - '**' + workflow_dispatch: + +permissions: + contents: write + +jobs: + publish-release: + name: Publish GitHub Release + runs-on: ubuntu-latest + + steps: + - name: Publish release for pushed tag + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + generate_release_notes: true diff --git a/.gitignore b/.gitignore index 527963f..52822ed 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* +firebase-debug.log #environment variables .env diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b798628 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- `src/components/`: UI modules grouped by feature (`App`, `Gallery`, `Layout`, `Login`, shared `Common`). +- `src/state/`: Redux store setup, action types/creators, and reducers. +- `src/api/`: client calls for images/users APIs. +- `src/utils/` and `src/utillity/`: helpers (logging, idle timer, UUID helpers). +- `public/`: static assets used by CRA. +- `src/assets/`: bundled fonts and CSS icon assets. +- Tests currently live beside components (example: `src/components/App/App.test.tsx`). + +## Build, Test, and Development Commands +- `yarn start`: run the app locally on `http://localhost:3000`. +- `yarn build`: generate the production bundle in `build/`. +- `yarn test`: run Jest + React Testing Library in watch mode. +- `npm run