Skip to content

Refactor/project baseline#420

Open
karan1633 wants to merge 13 commits intofrontend-rewritefrom
refactor/project-baseline
Open

Refactor/project baseline#420
karan1633 wants to merge 13 commits intofrontend-rewritefrom
refactor/project-baseline

Conversation

@karan1633
Copy link
Copy Markdown
Contributor

Phase 1: Frontend Foundation Cleanup and Baseline Setup

Summary

This PR establishes the initial foundation for the Summit frontend rebuild.
The goal of this phase is to reset the repo into a clean, professional baseline before feature and component development begins.

This PR focuses on:

  • dependency alignment
  • App Router direction
  • TypeScript baseline
  • ESLint / Prettier quality gates
  • Husky / lint-staged / commitlint workflow
  • environment setup direction
  • architecture library decisions

Why

The Summit frontend repo is being rebuilt as an open-source, production-grade frontend codebase.

Before building features, we need:

  • a clean technical baseline
  • consistent code quality rules
  • better contributor experience
  • stronger long-term maintainability
  • a clear direction for architecture

This phase intentionally avoids feature work and instead prepares the repo for scalable development.


What Changed

1. Repo baseline cleanup

  • cleaned the frontend repo to keep only essential config and base setup
  • removed deprecated / unnecessary starting setup
  • aligned the repo toward a fresh rebuild approach

2. Dependency alignment

  • aligned next, react, react-dom, and eslint-config-next
  • removed deprecated @next/font
  • improved package.json scripts for linting, formatting, and typechecking

3. App Router direction

  • adopted the Next.js App Router approach
  • moved toward src/app as the application entry structure
  • positioned the repo for modern Next.js architecture

4. TypeScript baseline

  • enabled strict TypeScript mode
  • added path alias support with @/* -> src/*
  • improved TypeScript config for cleaner scaling and safer code

5. ESLint and formatting foundation

  • added production-grade ESLint direction for:
    • import sorting
    • unused import cleanup
    • consistent type imports
    • React hooks discipline
    • controlled console usage
  • added Prettier compatibility
  • established clean-code rules for consistency across contributors

6. Git workflow quality gates

  • set up Husky
  • set up lint-staged
  • set up commitlint
  • enabled pre-commit formatting/lint checks for staged files

7. Architecture library decisions

Selected and prepared the base architecture stack for future implementation:

  • @tanstack/react-query for server state
  • zustand for client/global UI state
  • react-hook-form for forms
  • zod and @hookform/resolvers for validation

Key Decisions

App architecture

  • use src/
  • use App Router
  • avoid jumping directly into feature/components without structure

State management

  • TanStack Query for server state
  • Zustand only for client/global UI state

Validation and forms

  • React Hook Form + Zod as the standard form/validation approach

Code quality

  • ESLint + Prettier + Husky + lint-staged + commitlint as the baseline contributor workflow

What is intentionally not included in this PR

This PR does not include:

  • business features
  • UI component development
  • final src/ folder skeleton
  • provider wiring
  • env validation implementation
  • testing framework setup
  • API client implementation

Those will be added in the next phases.


Impact

This PR gives the Summit frontend repo:

  • a cleaner starting point
  • better consistency across contributions
  • safer TypeScript defaults
  • modern Next.js direction
  • stronger pre-commit safeguards
  • a clear foundation for architecture-first development

Next Steps

Planned follow-up work:

  1. define the final src/ folder skeleton
  2. establish folder boundaries and dependency rules
  3. add provider setup for TanStack Query
  4. implement env validation
  5. add clean Next config
  6. begin first feature with new architecture

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants