Skip to content

Author ARCHITECTURE.md and an API integration guide for the Predictify frontend #214

@greatest0fallt1me

Description

@greatest0fallt1me

Description

The repo has extensive feature docs (docs/infinite-scroll-ux.md, the ACTIVITY_TIMELINE_* and TYPOGRAPHY* markdown files, a CONTRIBUTING.md, and docs/INSTALLATION.md/QUICKSTART.md) but no top-level architecture overview and no API documentation — docs/README.md indexes the existing docs without either. New contributors must reverse-engineer the route-group structure, the Zustand stores, the wallet layer, and how the (currently unused) NEXT_PUBLIC_API_URL is meant to be consumed. This issue adds an ARCHITECTURE.md and an API integration guide.

Requirements and context

  • Add docs/ARCHITECTURE.md describing the App Router route groups ((marketing), (dashboard), (auth)), the state layer (lib/events-store.ts Zustand store, context/WalletContext.tsx), the wallet integration (hooks/useWallet.hook.ts, constants/wallet-kits.constant.ts), and the component organization (components/ui, components/events, components/disputes, components/navbar).
  • Add docs/API.md documenting the env config (lib/env.ts/lib/config.ts, especially NEXT_PUBLIC_API_URL and NEXT_PUBLIC_STELLAR_NETWORK), the expected events/transactions data shapes from types/ and lib/mock-data.ts, and where real API calls should be introduced.
  • Link both from docs/README.md so they are discoverable.
  • Non-functional: every file/path referenced must exist (no invented modules); keep the doc style consistent with the existing docs/ files; include a simple route/state diagram (ASCII or mermaid).
  • Note clearly which integrations are still mocked today so the docs do not overstate functionality.

Acceptance criteria

  • docs/ARCHITECTURE.md covers route groups, state layer, wallet layer, and component organization with correct paths.
  • docs/API.md documents env config and the events/transactions data shapes and the intended integration point.
  • Both docs are linked from docs/README.md.
  • Every referenced file/path exists in the repo.
  • Mocked-vs-real status is stated explicitly.
  • A route/state diagram is included.

Suggested execution

1. Fork the repo and create a branchgit checkout -b docs/architecture-and-api.

2. Implement changes — add docs/ARCHITECTURE.md and docs/API.md; update docs/README.md.

3. Write/extend tests — no unit tests apply to docs; instead verify the build still passes and links resolve. (This repo uses Jest + React Testing Library with pnpm for code; run the validate pipeline to ensure nothing else broke.)

4. Test and commit

pnpm install
pnpm lint
pnpm build

Example commit message

docs: add ARCHITECTURE.md and API integration guide and link from docs index

Guidelines

  • No coverage change is expected for docs; instead ensure 100% of referenced paths are accurate and verified against the repo.
  • Keep diagrams and terminology consistent with existing docs; clearly flag mocked features.
  • Timeframe: 96 hours.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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