Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5c005ed
fix(store): repair broken transaction store after bad merge
dzekojohn4 Jun 11, 2026
ef22bed
fix(store): align wallet store with useWallet hook
dzekojohn4 Jun 11, 2026
be8b1e9
fix(hooks): correct wallet hook service import and method name
dzekojohn4 Jun 11, 2026
ca38c17
feat(pages): add dashboard, send, and history pages
dzekojohn4 Jun 11, 2026
394a623
feat(layout): add global Navbar and Toaster
dzekojohn4 Jun 11, 2026
97dd1e9
feat(utils): add formatters and validators utilities
dzekojohn4 Jun 11, 2026
5a2f6a6
feat(tests): add test infrastructure and unit tests for utils and com…
dzekojohn4 Jun 11, 2026
5067529
feat(tests): add Card, Table, and FormInput component tests
dzekojohn4 Jun 11, 2026
62e9782
feat(ci): add GitHub Actions CI pipeline for lint, test, and build
dzekojohn4 Jun 11, 2026
d495409
fix(build): install @hookform/resolvers and fix type imports
dzekojohn4 Jun 11, 2026
4919cd8
feat(pages): add global error boundary and loading state
dzekojohn4 Jun 11, 2026
3135517
fix(hooks): wrap fetchTransactions and sendMoney in useCallback
dzekojohn4 Jun 11, 2026
ef03062
feat(eslint): extend config with TypeScript and React Hooks rules
dzekojohn4 Jun 11, 2026
8779416
style: add prettier config and ignore files
dzekojohn4 Jun 11, 2026
a460527
fix(hooks): remove duplicate toast import in useTransactions
dzekojohn4 Jun 11, 2026
d1c62be
fix(types): rename Partial and Awaited to Optional and UnwrapPromise …
dzekojohn4 Jun 11, 2026
0566872
fix(types): remove duplicate WalletState interface from wallet.ts
dzekojohn4 Jun 11, 2026
7daa4ee
fix(tests): remove unsafe any cast in FormInput test
dzekojohn4 Jun 11, 2026
969cc12
feat(docs): write comprehensive README with setup guide and contribut…
dzekojohn4 Jun 11, 2026
8121c12
feat(app): add 404 not-found page
dzekojohn4 Jun 11, 2026
90f6b62
feat(components): add Skeleton loading placeholder component
dzekojohn4 Jun 11, 2026
c1f43ef
feat(seo): add robots.ts for search engine indexing rules
dzekojohn4 Jun 11, 2026
a983f03
feat(seo): add sitemap.ts for SEO
dzekojohn4 Jun 11, 2026
7d16ef6
feat(components): add Footer component
dzekojohn4 Jun 11, 2026
9ed8143
feat(components): add Badge component with color variants
dzekojohn4 Jun 11, 2026
0b1f247
feat(components): add Spinner component with size variants
dzekojohn4 Jun 11, 2026
bb57079
feat(components): add Alert component with status variants
dzekojohn4 Jun 11, 2026
ef1c00f
feat(components): add Avatar component with initials fallback
dzekojohn4 Jun 11, 2026
cf7a65a
feat(components): add Breadcrumb navigation component
dzekojohn4 Jun 11, 2026
7820f9d
feat(components): add Modal dialog component
dzekojohn4 Jun 11, 2026
c6cfe0a
feat(components): add Tooltip component with hover and focus support
dzekojohn4 Jun 11, 2026
ab1dd20
feat(components): add Select dropdown component
dzekojohn4 Jun 11, 2026
ebdf7cc
feat(components): add Textarea form input component
dzekojohn4 Jun 11, 2026
d42b3a3
feat(components): add Toggle switch component
dzekojohn4 Jun 11, 2026
4230d79
feat(components): add ProgressBar component
dzekojohn4 Jun 11, 2026
8fa608c
feat(components): add Pagination component
dzekojohn4 Jun 11, 2026
f6dd3e0
feat(hooks): add useDebounce hook
dzekojohn4 Jun 11, 2026
03424be
feat(hooks): add useLocalStorage hook
dzekojohn4 Jun 11, 2026
616bd32
test(components): add Spinner component tests
dzekojohn4 Jun 11, 2026
64e73bd
test(components): add Badge component tests
dzekojohn4 Jun 11, 2026
91712f8
docs: add contributing guidelines
dzekojohn4 Jun 11, 2026
89deb6b
chore(legal): add MIT license
dzekojohn4 Jun 11, 2026
cbb1527
test(components): add Alert component tests
dzekojohn4 Jun 11, 2026
56b2f69
fix(app): remove console.error from error boundary
dzekojohn4 Jun 11, 2026
112f28c
fix(components): remove unused Button import from Modal
dzekojohn4 Jun 11, 2026
9140412
fix(hooks): remove console warnings from useLocalStorage
dzekojohn4 Jun 11, 2026
9794ff4
fix(components): fix FormInput register type for generic forms
dzekojohn4 Jun 11, 2026
20977f9
fix(components): remove unused clsx import from Breadcrumb
dzekojohn4 Jun 11, 2026
6c36eef
fix(tests): remove unused Asset import from validators test
dzekojohn4 Jun 11, 2026
b9e5300
fix(components): use Next.js Image component in Avatar
dzekojohn4 Jun 11, 2026
11153d2
fix(components): remove unused FieldValues import from FormInput
dzekojohn4 Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
{
"extends": "next/core-web-vitals"
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
"plugins": ["@typescript-eslint", "react-hooks"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"no-console": "warn"
},
"ignorePatterns": ["node_modules/", ".next/", "out/", "jest.config.js"]
}
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Summary

<!-- Describe the changes in this PR -->

## Related Issues

<!-- Link to any related issues (e.g., Fixes #123) -->

## Changes

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring

## Testing

- [ ] Unit tests pass (`npm run test`)
- [ ] Build passes (`npm run build`)
- [ ] Lint passes (`npm run lint`)

## Screenshots

<!-- If applicable, add screenshots to help explain your changes -->
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches: [main, 'fix/**', 'feat/**']
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run test:ci

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.next
out
coverage
package-lock.json
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2
}
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to StellarRemit

Thank you for your interest in contributing! We welcome issues, feature requests, and pull requests.

## Getting Started

1. Fork the repository
2. Clone your fork: `git clone https://github.com/your-username/StellarRemit-Frontend.git`
3. Create a branch: `git checkout -b feat/your-feature`

## Development Workflow

```bash
npm install
npm run dev
```

Run tests and lint before committing:

```bash
npm run lint
npm run test:ci
```

## Commit Messages

We use [Conventional Commits](https://www.conventionalcommits.org/):

- `feat:` — New feature
- `fix:` — Bug fix
- `docs:` — Documentation changes
- `style:` — Code style changes
- `refactor:` — Refactoring
- `test:` — Tests
- `chore:` — Build or config changes

## Code Style

- TypeScript strict mode
- ESLint + Prettier
- Use `clsx` for conditional classes
- Prefer named exports for components

## Pull Requests

- Ensure CI passes (lint, test, build)
- Add tests for new features
- Update documentation if needed
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 HorizonBridge Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
182 changes: 162 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,184 @@

Cross-border remittance platform built on the Stellar blockchain.

## Stack
## Overview

- Next.js 14 (App Router) + TypeScript
- Tailwind CSS
- Zustand (state management)
- Axios (API calls)
- Freighter Wallet (Stellar)
- Zod (validation)
- react-hot-toast (notifications)
StellarRemit is a modern web application that enables fast, low-cost international money transfers using the Stellar blockchain. Connect your Freighter wallet, view your balances, send money to anyone with a Stellar address, and track your transaction history — all from a clean, responsive interface.

## Features

- **Wallet Integration** — Connect via the Freighter browser extension
- **Real-time Balances** — View XLM and USDC balances fetched from Horizon
- **Send Money** — Transfer assets to any Stellar address with form validation
- **Transaction History** — Browse and filter your past transfers
- **Responsive UI** — Works on desktop, tablet, and mobile
- **Error Boundaries** — Graceful error handling across pages
- **Loading States** — Skeletons and spinners for smooth UX

## Tech Stack

- **Framework:** Next.js 14 (App Router) + TypeScript
- **Styling:** Tailwind CSS
- **State Management:** Zustand
- **API Client:** Axios
- **Wallet:** Freighter API + Stellar SDK
- **Validation:** Zod + react-hook-form
- **Notifications:** react-hot-toast
- **Testing:** Jest + React Testing Library
- **Linting:** ESLint + Prettier

## Getting Started

### Prerequisites

- Node.js 20+
- npm or yarn
- [Freighter Wallet](https://www.freighter.app/) browser extension

### Installation

```bash
cp .env.example .env.local
# Clone the repository
git clone https://github.com/HorizonBridgeLabs/StellarRemit-Frontend.git
cd StellarRemit-Frontend

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env.local
```

### Environment Variables

| Variable | Description | Example |
|---|---|---|
| `NEXT_PUBLIC_API_URL` | Backend API base URL | `https://api.stellarremit.com` |
| `NEXT_PUBLIC_STELLAR_NETWORK` | Stellar network to use | `testnet` or `mainnet` |

### Development

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).

### Production Build

```bash
npm run build
npm start
```

## Project Structure

```
src/
├── app/ # Next.js App Router pages & layouts
├── components/ # Reusable UI components
├── hooks/ # Custom React hooks
├── store/ # Zustand state stores
├── services/ # Axios API service layer
├── types/ # TypeScript type definitions
└── utils/ # Helper utilities
├── app/ # Next.js App Router pages & layouts
│ ├── page.tsx # Landing page
│ ├── layout.tsx # Root layout
│ ├── error.tsx # Global error boundary
│ ├── loading.tsx # Global loading state
│ ├── not-found.tsx # 404 page
│ ├── dashboard/ # Dashboard page
│ ├── send/ # Send money page
│ └── history/ # Transaction history page
├── components/ # Reusable UI components
│ ├── Navbar.tsx
│ ├── Sidebar.tsx
│ ├── Button.tsx
│ ├── Card.tsx
│ ├── FormInput.tsx
│ ├── Table.tsx
│ ├── Footer.tsx
│ ├── Spinner.tsx
│ ├── Badge.tsx
│ ├── Alert.tsx
│ ├── Skeleton.tsx
│ ├── Avatar.tsx
│ ├── Breadcrumb.tsx
│ ├── Modal.tsx
│ └── Tooltip.tsx
├── hooks/ # Custom React hooks
│ ├── useWallet.ts
│ └── useTransactions.ts
├── store/ # Zustand state stores
│ ├── walletStore.ts
│ └── transactionStore.ts
├── services/ # API service layer
│ ├── api.ts
│ ├── walletService.ts
│ ├── transactionService.ts
│ └── walletApiService.ts
├── types/ # TypeScript type definitions
│ ├── index.ts
│ └── wallet.ts
├── utils/ # Helper utilities
│ ├── formatters.ts
│ ├── validators.ts
│ └── index.ts
└── __tests__/ # Unit and component tests
├── components/
└── utils/
```

## Environment Variables
## Available Scripts

| Variable | Description |
| Script | Description |
|---|---|
| `NEXT_PUBLIC_API_URL` | Backend API base URL |
| `NEXT_PUBLIC_STELLAR_NETWORK` | `testnet` or `mainnet` |
| `npm run dev` | Start development server |
| `npm run build` | Build for production |
| `npm start` | Start production server |
| `npm run lint` | Run ESLint |
| `npm run test` | Run tests in watch mode |
| `npm run test:ci` | Run tests with coverage (CI) |
| `npm run test:watch` | Run tests in watch mode |

## Testing

Tests are written with Jest and React Testing Library. Run the test suite:

```bash
npm run test:ci
```

Coverage is collected from all `src/**/*.{ts,tsx}` files except type declarations and app router pages.

## Contributing

We welcome contributions! Please follow these steps:

1. Fork the repository
2. Create a feature branch: `git checkout -b feat/your-feature`
3. Make your changes and ensure tests pass
4. Commit with clear messages: `git commit -m "feat: add new feature"`
5. Push to your fork: `git push origin feat/your-feature`
6. Open a Pull Request against `main`

### Commit Convention

We use [Conventional Commits](https://www.conventionalcommits.org/):

- `feat:` — New feature
- `fix:` — Bug fix
- `docs:` — Documentation
- `style:` — Formatting (no code change)
- `refactor:` — Code refactoring
- `test:` — Tests
- `chore:` — Build/config changes

### Code Style

- TypeScript strict mode enabled
- ESLint + Prettier for formatting
- Components should be typed with explicit interfaces
- Use `clsx` for conditional class names

## CI/CD

GitHub Actions runs lint, test, and build on every push to `main` and `fix/**`/`feat/**` branches, and on every pull request.

## License

[MIT](LICENSE)
Loading
Loading