Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_NETWORK=testnet
NEXT_PUBLIC_CONTRACT_ID=
3 changes: 3 additions & 0 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
89 changes: 89 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# PrivacyLayer Frontend

A Next.js frontend for the PrivacyLayer privacy pool dApp on Stellar.

## Tech Stack

- **Framework**: Next.js 15 with App Router
- **Language**: TypeScript (strict mode)
- **Styling**: Tailwind CSS
- **State Management**: Zustand
- **Data Fetching**: TanStack React Query
- **Wallet**: Freighter Wallet Integration

## Getting Started

### Prerequisites

- Node.js 18+
- npm or yarn
- Freighter Wallet browser extension

### Installation

```bash
npm install
```

### Development

```bash
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) in your browser.

### Build

```bash
npm run build
```

### Production

```bash
npm start
```

## Project Structure

```
frontend/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── layout.tsx # Root layout with providers
│ │ ├── page.tsx # Home page
│ │ ├── deposit/ # Deposit flow
│ │ ├── withdraw/ # Withdrawal flow
│ │ └── history/ # Transaction history
│ ├── components/
│ │ ├── ui/ # Reusable UI components
│ │ ├── layout/ # Layout components
│ │ └── features/ # Feature-specific components
│ └── lib/
│ ├── sdk.ts # SDK integration
│ └── utils.ts # Utility functions
├── public/ # Static assets
├── tailwind.config.js # Tailwind configuration
├── tsconfig.json # TypeScript configuration
└── next.config.js # Next.js configuration
```

## Features

- **Deposit**: Deposit XLM into the privacy pool with zero-knowledge proofs
- **Withdraw**: Withdraw funds privately to any Stellar address
- **History**: View your transaction history

## Environment Variables

Create a `.env.local` file with:

```
NEXT_PUBLIC_NETWORK=testnet
NEXT_PUBLIC_CONTRACT_ID=your_contract_id
```

## License

MIT
6 changes: 6 additions & 0 deletions frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
9 changes: 9 additions & 0 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: [],
},
}

module.exports = nextConfig
Loading