Skip to content

feat: add delivery type definitions and update project configuration - #61

Merged
johdanike merged 2 commits into
SwiftChainn:mainfrom
BigJohn-dev:chore/init-setup
Apr 29, 2026
Merged

feat: add delivery type definitions and update project configuration#61
johdanike merged 2 commits into
SwiftChainn:mainfrom
BigJohn-dev:chore/init-setup

Conversation

@BigJohn-dev

Copy link
Copy Markdown
Contributor

Closes #1

🎯 Overview

This PR initializes the frontend repository setup to match the required architecture specification for SwiftChain. It sets up Next.js App Router, configures TailwindCSS with custom blockchain-focused brand colors, and correctly establishes a strict Component -> Hook -> Service pattern for fetching API data.

🚀 Technical Changes

  • Next.js & TypeScript Setup: Verified core dependencies and scaffolding for a smooth Next.js 14+ / 16 development experience using App Router.
  • Tailwind Config & Branding: Overhauled tailwind.config.ts and app/global.css adding Tailwind v4 utility variables to structure primary (blue variants), secondary (amber), and success (emerald) palettes that reflect our logistics ecosystem.
  • Strict Architecture Implementation:
    • services/api.ts: Central Axios configuration referencing NEXT_PUBLIC_API_URL.
    • services/deliveries.service.ts: API wrapper service to execute strict typed fetches.
    • hooks/useDeliveries.ts: State management layer consuming React Query / TanStack Query logic to prevent re-renders and cache payload states seamlessly.
    • components/DeliveryList.tsx: Reusable UI module resolving the fetched data, isLoading, and error parameters dynamically with NO hardcoded mock data.
  • Global Providers Integration: Constructed a wrapper components/Providers.tsx maintaining an isolated TanStack QueryClientProvider integrated at the root level inside app/layout.tsx.

✅ Acceptance Criteria Verified

  • App Compiles without Strict Errors: Application builds fine under strict TypeScript checking bounds. Both npm run type-check and npm run build returned successfully with zero critical errors.
  • Strict Layered Architecture Setup: The architecture separates concerns exactly as specified.
  • Data Extracted API (No Inline Mocks): The API architecture directly bridges Axios standard GET requests and renders dynamic payloads dynamically.
  • Unit Testing Checked: Pre-configured suite processes appropriately without faults.

@drips-wave

drips-wave Bot commented Apr 25, 2026

Copy link
Copy Markdown

@BigJohn-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@johdanike

Copy link
Copy Markdown
Contributor

@BigJohn-dev resolve conflicts

@johdanike

Copy link
Copy Markdown
Contributor

Resolve conflict @BigJohn-dev

@johdanike

Copy link
Copy Markdown
Contributor

Resolve conflicts @BigJohn-dev

@johdanike
johdanike merged commit 09c8702 into SwiftChainn:main Apr 29, 2026
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.

Frontend: Setup Next.js App Router & Tailwind

2 participants