Skip to content

Latest commit

 

History

History
144 lines (96 loc) · 2.77 KB

File metadata and controls

144 lines (96 loc) · 2.77 KB

facilpay-frontend

Merchant dashboard for FacilPay. Manage payments, view analytics, configure webhooks, and handle refunds through an intuitive web interface.


Table of Contents


Project Overview

This project is a production-ready Next.js 14+ application built with TypeScript and modern tooling.
It serves as the foundation for:

  • Payment management
  • Analytics dashboards
  • Webhooks handling
  • Refund management

The frontend leverages:

  • Next.js 14+ App Router for routing and server-side rendering
  • TypeScript with strict mode for type safety
  • Tailwind CSS for responsive and scalable styling

Prerequisites

  • Node.js: version 18 or higher
  • Package manager: npm or pnpm
  • Git for version control

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/facilpay-frontend.git
cd facilpay-frontend
  1. Install dependencies:
npm install
# or
pnpm install
  1. Create .env.local from the example:
cp .env.local.example .env.local
  1. Fill in the required environment variables (see Environment Variables).

Development Workflow

Start the development server:

npm run dev
# or
pnpm dev
  • Visit http://localhost:3000
  • Hot-reloading enabled for fast development
  • TypeScript strict mode ensures early detection of errors

Environment Variables

Create .env.local with the following content:

# Stellar Network Configuration
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
NEXT_PUBLIC_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org

# Contract Addresses (to be filled)
NEXT_PUBLIC_PAYMENT_CONTRACT_ID=
NEXT_PUBLIC_ESCROW_CONTRACT_ID=
NEXT_PUBLIC_REFUND_CONTRACT_ID=

# Application Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000

⚠️ Do not commit .env.local. Only commit .env.local.example.


Running the App

  • Development: npm run dev or pnpm dev
  • Production build: npm run build
  • Start production server: npm start

Contribution

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch:
git checkout -b feat/your-feature
  1. Make changes and commit:
git commit -m "feat: add feature description"
  1. Push your branch:
git push origin feat/your-feature
  1. Open a pull request.