Decentralized agricultural credit platform built on the Stellar network.
- Framework: Next.js 15 (App Router)
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS v4 + shadcn/ui
- Design System: Stellar brand colors + atomic design pattern
- Package Manager: pnpm
- Node.js 20+
- pnpm (
npm install -g pnpm) - Git
git clone [email protected]:Farm-credit/stellar-app-os.git
cd stellar-app-os
pnpm install
pnpm devOpen http://localhost:3000 to see the app.
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Production build (also runs type-check) |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
pnpm generate-icons |
Generate PWA icons from source |
FarmCredit is a fully functional Progressive Web App with offline support and installability.
- π± Installable - Add to home screen on mobile and desktop
- π Offline Support - Works without internet connection
- π Fast Loading - Cached assets for instant load times
- π Push Notifications - Optional notification support
- π Network Aware - Detects and adapts to connection status
# Install PWA dependencies
npm install next-pwa @ducanh2912/next-pwa workbox-window
npm install -D @types/serviceworker sharp
# Generate icons
npm run generate-icons
# Build and test
npm run build
npm start- PWA Setup Guide - Comprehensive setup and deployment
- Installation Guide - Quick start guide
- Testing Checklist - Complete testing guide
- Quick Reference - Commands and tips
- Build production version:
npm run build && npm start - Open DevTools β Application β Service Workers
- Verify service worker is active
- Test offline: DevTools β Network β Offline
- Run Lighthouse audit for PWA score
This project follows the atomic design pattern. Components are organized by complexity, not by feature.
stellar-app-os/
βββ app/ # Next.js App Router pages & layouts
β βββ globals.css # Stellar color tokens + Tailwind config
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
βββ components/
β βββ atoms/ # Smallest building blocks (Button, Input, Text, Badge)
β βββ molecules/ # Combinations of atoms (Card)
β βββ organisms/ # Complex sections (headers, forms β to be built)
β βββ templates/ # Page-level layouts (to be built)
β βββ ui/ # shadcn/ui base components (do not edit directly unless extending)
βββ lib/
β βββ utils.ts # Shared utilities (cn() helper)
βββ public/ # Static assets
| Level | Purpose | Example |
|---|---|---|
| Atoms | Single-purpose UI elements | Button, Input, Text, Badge |
| Molecules | Groups of atoms working together | Card, FormField |
| Organisms | Complex UI sections | Header, DonationForm, ProjectGrid |
| Templates | Page-level structural layouts | DashboardLayout, AuthLayout |
These brand colors are defined in app/globals.css and available as Tailwind classes:
| Token | Value | Tailwind Class |
|---|---|---|
| Stellar Blue | #14B6E7 |
bg-stellar-blue, text-stellar-blue |
| Stellar Purple | #3E1BDB |
bg-stellar-purple, text-stellar-purple |
| Stellar Navy | #0D0B21 |
bg-stellar-navy, text-stellar-navy |
| Stellar Cyan | #00C2FF |
bg-stellar-cyan, text-stellar-cyan |
| Stellar Green | #00B36B |
bg-stellar-green, text-stellar-green |
No barrel exports. Always import directly from the component file:
// Correct
import { Button } from '@/components/atoms/Button';
import { Card, CardHeader } from '@/components/molecules/Card';
// Wrong β do not use index.ts barrel exports
import { Button } from '@/components/atoms';Browse open issues labeled Stellar Wave. Comment on the issue to claim it. Do not work on an issue someone else has claimed without coordinating.
Always start from the latest main:
git checkout main
git pull origin main
git checkout -b feat/<issue-number>-<short-description>Branch naming examples:
feat/42-wallet-connect-modalfix/78-rate-limit-toastdocs/107-contributing-guide
- TypeScript strict mode β no
any, no unused variables - Component patterns β use
forwardRefwhere needed, always setdisplayName, export named types - Naming β PascalCase for components, camelCase for functions/variables, kebab-case for CSS classes
- Atomic design β atoms extend
ui/base components with Stellar variants; molecules compose atoms - No barrel exports β import directly from the file, not from
index.ts
This project enforces Conventional Commits and atomic commits.
<type>(<scope>): <short description>
[optional body]
[optional footer]
| Type | When to use |
|---|---|
feat |
New feature or component |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting, no logic change |
refactor |
Code restructuring, no behavior change |
perf |
Performance improvement |
test |
Adding or updating tests |
build |
Build system or dependency changes |
ci |
CI configuration changes |
chore |
Maintenance tasks |
auth, wallet, dashboard, marketplace, admin, donation, carbon, ui, layout, nav, config, deps
feat(wallet): add Stellar wallet connection modal
fix(donation): correct minimum amount validation
docs(contributing): add commit convention section
style(ui): format Button component with Prettier
refactor(dashboard): extract tab components into separate files- One concern per commit β never mix a bug fix with a new feature
- Each commit must build β
pnpm buildmust pass at every single commit - Each commit must be revertable β reverting one commit must not break unrelated code
- Order matters β foundation first, then features, then polish
Bad example (one giant commit):
feat: add dashboard with tabs, fix header bug, update colors
Good example (atomic):
feat(dashboard): create dashboard page layout
feat(dashboard): add overview tab component
feat(dashboard): add donations tab component
fix(nav): correct active link highlighting on dashboard
style(dashboard): align tab content padding
# Make sure you're up to date with main
git checkout main
git pull origin main
git checkout <your-branch>
git rebase main
# Verify everything passes
pnpm build
pnpm lintEvery PR must include:
- Linked issue β use
Closes #<issue-number>in the PR description - Screen recording β record your implementation working in the browser and attach it to the PR
- Filled PR template β Summary, What Was Implemented, Implementation Details, How to Test
- Passing CI β build and lint must pass
PRs without a screen recording or without a linked issue will not be reviewed.
When you open a PR, the template will auto-populate. Fill out every section:
## Summary
<!-- 1-3 sentences: What does this PR do and why? -->
## Related Issue
Closes #<issue-number>
## What Was Implemented
<!-- Detailed list of what was built/changed -->
- [ ] Component X created
- [ ] Styling applied with Stellar tokens
- [ ] Responsive on mobile
## Implementation Details
<!-- Key decisions, patterns used, trade-offs -->
## Screenshots / Recordings
<!-- REQUIRED: Screen recording of your implementation -->
## How to Test
<!-- Step-by-step for reviewers -->
1. Checkout this branch
2. Run `pnpm dev`
3. Navigate to /path
4. Verify X works- Expect feedback. Reviews are about improving the code, not criticizing the author.
- Respond to every comment β either make the change or explain why not.
- After addressing feedback, re-request review.
- Maintainers will merge once approved and CI passes.
While your PR is in review, keep your branch up to date:
git checkout main
git pull origin main
git checkout <your-branch>
git rebase main
git push --force-with-leaseThis project is open source. See LICENSE for details.