Skip to content

Initialize Frontend Monorepo #766

Description

@DokaIzk

Title: init: scaffold Next.js frontend project with TypeScript, Tailwind, and testing setup

Labels: frontend infrastructure setup
Complexity: high
Priority: 🚨 BLOCKER
Branch: init/frontend-scaffold


Problem Context

The SoroScan project currently has no frontend codebase. To begin building UI components, dashboards, and applications, we need a properly configured development environment with modern tooling (Next.js 14+ with App Router), TypeScript strict mode, Tailwind CSS, and testing infrastructure.


Scope

Included:

  • Next.js 14+ project in /soroscan-frontend/ with App Router
  • TypeScript strict configuration
  • Tailwind CSS (basic config, extended in Design System issue)
  • Jest + React Testing Library
  • ESLint + Prettier
  • Husky pre-commit hooks
  • Docker support for dev environment
  • Root monorepo package.json with workspaces
  • GitHub Actions workflow for lint/test

Not included:

  • Design System components (FE-2)
  • Any pages or features
  • Storybook (FE-2)

Implementation Guidelines

Directory structure:

soroscan-frontend/
├── package.json
├── next.config.js
├── tsconfig.json
├── tailwind.config.js
├── jest.config.js
├── .eslintrc.json
├── .prettierrc
├── postcss.config.js
├── src/
│   ├── app/
│   │   ├── layout.tsx
│   │   └── page.tsx
│   ├── components/
│   ├── styles/
│   │   └── globals.css
│   └── __tests__/
├── public/
└── Dockerfile.frontend

Key dependencies:

{
  "dependencies": {
    "next": "^14.0.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@testing-library/react": "^14.0.0",
    "@types/jest": "^29.5.0",
    "@typescript-eslint/eslint-plugin": "^6.0.0",
    "jest": "^29.5.0",
    "tailwindcss": "^3.3.0",
    "typescript": "^5.0.0"
  }
}

NPM scripts:

{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint src --max-warnings 0",
    "format": "prettier --write src",
    "test": "jest --watch",
    "test:ci": "jest --ci --coverage"
  }
}

Constraints:

  • TypeScript strict: true — no any types allowed
  • ESLint with Next.js recommended rules
  • Jest coverage threshold ≥ 70%
  • All code must pass npm run lint before commit

Acceptance Criteria

  • npm install in soroscan-frontend/ succeeds
  • npm run dev starts Next.js dev server on http://localhost:3000
  • npm run lint passes with zero warnings
  • npm run test:ci runs and passes (example test included)
  • Docker build succeeds: docker build -f soroscan-frontend/Dockerfile.frontend -t soroscan-frontend .
  • docker-compose up runs frontend alongside backend
  • Frontend can make requests to backend: http://localhost:8000/
  • GitHub Actions workflow (frontend-ci.yml) runs lint + test on PR


Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions