Skip to content

Commit 9b1e4bb

Browse files
authored
Merge pull request #60 from bitsnark/develop
UI Updates
2 parents 9ae8be2 + 73c2c53 commit 9b1e4bb

114 files changed

Lines changed: 6882 additions & 2522 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
VITE_WALLETCONNECT_PROJECT_ID=""
2+
VITE_RPC_URL=""
3+
VITE_API_BASE_URL=""
4+
VITE_EXPIRATION_HOURS=24

.github/workflows/ci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,24 @@ jobs:
2222
rm -rf node_modules package-lock.json
2323
2424
- name: Install deps
25-
run: npm install
25+
run: npm install --force
2626

2727
- name: Lint
2828
run: npm run lint
2929

30+
- name: Test
31+
run: npm run test
32+
env:
33+
CI: true # This ensures the process exits with a non-zero code if tests fail
34+
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
35+
VITE_RPC_URL: ${{ secrets.VITE_RPC_URL }}
36+
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
37+
VITE_EXPIRATION_HOURS: ${{ secrets.VITE_EXPIRATION_HOURS }}
38+
3039
- name: Build
3140
run: npm run build
41+
env:
42+
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
43+
VITE_RPC_URL: ${{ secrets.VITE_RPC_URL }}
44+
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
45+
VITE_EXPIRATION_HOURS: ${{ secrets.VITE_EXPIRATION_HOURS }}

.github/workflows/deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@ jobs:
2727
run: npm install netlify-cli@17.10.1 -g
2828

2929
- name: Install Dependencies
30-
run: npm install
30+
run: npm install --force
3131

3232
- name: Build project
3333
run: npm run build
3434
env:
3535
VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID }}
3636
VITE_RPC_URL: ${{ secrets.VITE_RPC_URL }}
37-
VITE_EXCHANGE_CONTRACT_ADDRESS: ${{ secrets.VITE_EXCHANGE_CONTRACT_ADDRESS }}
38-
VITE_TOKEN_ADDRESS: ${{ secrets.VITE_TOKEN_ADDRESS }}
3937
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
38+
VITE_EXPIRATION_HOURS: ${{ secrets.VITE_EXPIRATION_HOURS }}
4039
- name: Deploy to Netlify
4140
run: |
4241
DEPLOY_COMMAND="netlify deploy \

README.md

Lines changed: 107 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,111 @@
1-
# React + TypeScript + Vite
1+
# Florin Frontend
2+
3+
## Overview
4+
Florin is a modern web application built with React and TypeScript. It provides a user-friendly interface for interacting with blockchain functionality, featuring components for wallet integration, QR code generation, and form handling.
5+
6+
## Tech Stack
7+
- **Frontend Framework**: React 19
8+
- **Language**: TypeScript
9+
- **Build Tool**: Vite 6
10+
- **Styling**: Tailwind CSS 4
11+
- **State Management**: TanStack Query (React Query)
12+
- **Routing**: TanStack Router
13+
- **Form Handling**: React Hook Form with Zod validation
14+
- **UI Components**: Radix UI
15+
- **Blockchain Integration**: wagmi, viem
16+
- **Testing**: Vitest, React Testing Library
17+
- **Code Quality**: ESLint, Prettier
218

319
## Setup
420

5-
Run `yarn` or `npm install`
21+
### Prerequisites
22+
- Node.js (Latest LTS version recommended)
23+
- npm or yarn package manager
24+
25+
### Installation
26+
1. Clone the repository:
27+
```bash
28+
git clone [repository-url]
29+
cd florin-fe
30+
```
31+
32+
2. Install dependencies:
33+
```bash
34+
npm install
35+
# or
36+
yarn install
37+
```
38+
39+
### Development
40+
To start the development server:
41+
```bash
42+
npm run dev
43+
# or
44+
yarn dev
45+
```
46+
The application will be available at `http://localhost:5173`
47+
48+
### Production Build
49+
To create a production build:
50+
```bash
51+
npm run build
52+
# or
53+
yarn build
54+
```
55+
56+
To preview the production build locally:
57+
```bash
58+
npm run preview
59+
# or
60+
yarn preview
61+
```
62+
63+
## Environment Variables
64+
The application uses environment variables for configuration. Create a `.env` file in the root directory with the following variables:
65+
66+
```env
67+
VITE_WALLETCONNECT_PROJECT_ID=""
68+
VITE_RPC_URL=""
69+
VITE_API_BASE_URL=""
70+
VITE_EXPIRATION_HOURS=24
71+
```
72+
73+
## Main Scripts
74+
- `npm run dev` - Start development server
75+
- `npm run build` - Create production build
76+
- `npm run preview` - Preview production build
77+
- `npm run lint` - Run ESLint
78+
- `npm run format` - Format code with Prettier
79+
- `npm run test` - Run tests
80+
- `npm run test:coverage` - Run tests with coverage report
81+
- `npm run deploy-prod` - Deploy to production
82+
- `npm run deploy-staging` - Deploy to staging
83+
84+
## Tests
85+
The project uses Vitest and React Testing Library for testing. To run tests:
86+
87+
```bash
88+
# Run tests in watch mode
89+
npm run test
90+
91+
# Run tests with coverage
92+
npm run test:coverage
93+
```
94+
95+
## Deployment
96+
The project is deployed using github actions and netlify. Set the followings actions variables in order to correctly deploy to netlify:
97+
98+
NETLIFY_SITE_ID
99+
NETLIFY_AUTH_TOKEN
100+
101+
### Continuous deployment trigger
102+
On every new commit to `develop` (netflify preview) and `main` (netlify production)
103+
104+
## Contributing
105+
1. Create a new branch for your feature
106+
2. Make your changes
107+
3. Run tests and ensure they pass
108+
4. Submit a pull request
6109

7-
Run `yarn dev` or `npm run dev`
110+
## License
111+
[Add your license information here]

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en" class="dark">
33
<head>
44
<meta charset="UTF-8" />
5+
56
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
67
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
78
<title>Florin</title>

0 commit comments

Comments
 (0)