Skip to content

Commit 166f955

Browse files
committed
📝 WIP: Local changes before pulling remote updates
1 parent 6fbcd4d commit 166f955

131 files changed

Lines changed: 65700 additions & 20092 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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- run: npm ci && npm run build
15+
- uses: FirebaseExtended/action-hosting-deploy@v0
16+
with:
17+
repoToken: ${{ secrets.GITHUB_TOKEN }}
18+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MZANSI_CONVERT }}
19+
channelId: live
20+
projectId: mzansi-convert
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on PR
5+
on: pull_request
6+
permissions:
7+
checks: write
8+
contents: read
9+
pull-requests: write
10+
jobs:
11+
build_and_preview:
12+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: npm ci && npm run build
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MZANSI_CONVERT }}
21+
projectId: mzansi-convert

Clean-CraArtifacts.ps1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Set working directory to src/ if not already there
2+
Set-Location -Path "$PSScriptRoot\src"
3+
4+
Write-Host "🔍 Scanning for redundant .js/.jsx files..." -ForegroundColor Cyan
5+
6+
# Loop over all .ts/.tsx files to find matching .js/.jsx twins
7+
Get-ChildItem -Recurse -Include *.ts, *.tsx | ForEach-Object {
8+
$baseName = $_.BaseName
9+
$dir = $_.DirectoryName
10+
11+
# Check for .js and .jsx versions
12+
$jsPath = Join-Path $dir "$baseName.js"
13+
$jsxPath = Join-Path $dir "$baseName.jsx"
14+
15+
if (Test-Path $jsPath) {
16+
Remove-Item -Path $jsPath -Force
17+
Write-Host "🗑️ Removed duplicate: $jsPath" -ForegroundColor Yellow
18+
}
19+
if (Test-Path $jsxPath) {
20+
Remove-Item -Path $jsxPath -Force
21+
Write-Host "🗑️ Removed duplicate: $jsxPath" -ForegroundColor Yellow
22+
}
23+
}
24+
25+
# Remove CRA's react-app-env.d.ts
26+
$craEnv = "react-app-env.d.ts"
27+
if (Test-Path $craEnv) {
28+
Remove-Item -Path $craEnv -Force
29+
Write-Host "🧹 Removed legacy file: react-app-env.d.ts" -ForegroundColor Magenta
30+
}
31+
32+
# Add Vite-friendly vite-env.d.ts
33+
$viteEnv = "vite-env.d.ts"
34+
$viteContent = @"
35+
/// <reference types="vite/client" />
36+
37+
interface ImportMetaEnv {
38+
readonly VITE_API_URL?: string;
39+
readonly DEV: boolean;
40+
readonly PROD: boolean;
41+
}
42+
43+
interface ImportMeta {
44+
readonly env: ImportMetaEnv;
45+
}
46+
"@
47+
Set-Content -Path $viteEnv -Value $viteContent -Encoding UTF8
48+
Write-Host "✅ Created vite-env.d.ts with Vite type declarations." -ForegroundColor Green

README.backup.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
Your current `README.md` is already **professional, informative, and badge-rich**. Well done! 👏
2+
To take it to the next level **visually and structurally**, here are suggestions and an **enhanced version**:
3+
4+
---
5+
6+
## ✅ What You’re Doing Well
7+
8+
* 🏷️ Comprehensive badge use for build status, version, language split
9+
* 📸 SVG hero banner inclusion
10+
* 🧠 Clear usage examples in Python and TypeScript
11+
* 🔁 GitHub flow instructions for contributions
12+
* 📦 Clean tech stack section with logos
13+
14+
---
15+
16+
## 🔧 Suggestions for Improvements
17+
18+
| Area | Suggestion |
19+
| ---------------------- | ------------------------------------------------------------------- |
20+
| 🧭 **Structure** | Use `centered headings`, horizontal dividers (`<hr>`), and callouts |
21+
| 🎨 **Visual polish** | Replace some raw badge lines with emoji + table format |
22+
| 🖼 **Image scaling** | Use proper width on the banner image for consistent rendering |
23+
| 🧪 **Demo section** | Add a **demo GIF** or screenshot (if available) |
24+
| 🛡 **Deployment info** | Add badge/status for Firebase Hosting / CI |
25+
26+
---
27+
28+
## ✨ Enhanced `README.md` — Refined & Visual Version
29+
30+
```markdown
31+
<h1 align="center">📄➡️📊 FileFlip</h1>
32+
33+
<p align="center"><i>Convert PDF statements to structured spreadsheets effortlessly.</i></p>
34+
35+
<p align="center">
36+
<img src="https://raw.githubusercontent.com/jamtax/FileFlip/dc266a3a1fe109e261488d99a222ab5430476a4d/frontend/public/assets/fileflip-hero-banner.svg" width="700" alt="FileFlip Banner" />
37+
</p>
38+
39+
<p align="center">
40+
<a href="https://fileflip.jamtax.co.za"><strong>🌐 Visit App</strong></a> •
41+
<a href="#️-tech-stack">⚙️ Tech Stack</a> •
42+
<a href="#️-usage">💻 Usage</a> •
43+
<a href="#️-license">📜 License</a>
44+
</p>
45+
46+
---
47+
48+
### 🚀 Live App
49+
50+
👉 [https://fileflip.jamtax.co.za](https://fileflip.jamtax.co.za)
51+
52+
---
53+
54+
### 📦 Badges
55+
56+
![Version](https://img.shields.io/badge/version-0.1.0-blue)
57+
![Build](https://img.shields.io/badge/build-passing-brightgreen)
58+
[![License](https://img.shields.io/github/license/jamtax/FileFlip?color=blue)](https://github.com/jamtax/FileFlip/blob/main/LICENSE)
59+
[![Repo Stars](https://img.shields.io/github/stars/jamtax/FileFlip?style=social)](https://github.com/jamtax/FileFlip/stargazers)
60+
61+
---
62+
63+
### ✨ Key Features
64+
65+
- 📄 **PDF to CSV/XLSX** conversion
66+
- 📊 Spreadsheet-aware formatting (multi-table support)
67+
- 🔎 Smart data extraction
68+
- ⚡ Fast, secure, and accurate
69+
- 🚀 CI-powered deploys on Firebase
70+
71+
---
72+
73+
### ⚙️ Tech Stack
74+
75+
| Technology | Purpose |
76+
|-------------|----------------------|
77+
| 🔷 TypeScript | App Logic |
78+
| 🐍 Python | PDF Data Processing |
79+
| ⚛️ React | UI Framework |
80+
| ☁️ Firebase | Hosting & CI/CD |
81+
| 📊 Pandas | Structured Data Ops |
82+
83+
---
84+
85+
### 📁 Project Structure
86+
87+
```
88+
89+
FileFlip/
90+
├── public/ # Firebase static assets
91+
├── src/ # TypeScript/React frontend
92+
├── python/ # Backend utils for PDF parsing
93+
├── .github/workflows/ # CI/CD pipeline
94+
├── firebase.json # Firebase config
95+
└── README.md # You're reading it
96+
97+
````
98+
99+
---
100+
101+
### 🔧 Installation
102+
103+
```bash
104+
# Clone repo
105+
git clone https://github.com/jamtax/FileFlip.git
106+
cd FileFlip
107+
108+
# Frontend
109+
npm install
110+
111+
# Backend (Python)
112+
pip install -r requirements.txt
113+
````
114+
115+
---
116+
117+
### 💻 Usage Examples
118+
119+
#### 🐍 Python
120+
121+
```python
122+
from fileflip import convert_pdf
123+
124+
convert_pdf("input.pdf", "output.csv")
125+
```
126+
127+
#### 🟦 TypeScript
128+
129+
```ts
130+
import { convertPDF } from './fileflip';
131+
132+
await convertPDF('input.pdf', 'output.xlsx');
133+
```
134+
135+
---
136+
137+
### 🔁 Deployment (CI/CD)
138+
139+
✔ Auto-deploys to Firebase Hosting
140+
✔ GitHub Actions triggers on every `main` push
141+
✔ Token stored securely as `FIREBASE_TOKEN` secret
142+
143+
---
144+
145+
### 🤝 Contributing
146+
147+
```bash
148+
# Fork → Clone → Branch → Commit → Push → PR
149+
```
150+
151+
1. `git checkout -b feature/MyFeature`
152+
2. `git commit -m "Add MyFeature"`
153+
3. `git push origin feature/MyFeature`
154+
4. Open a Pull Request on GitHub
155+
156+
---
157+
158+
### 📊 Repo Stats
159+
160+
![Contributors](https://img.shields.io/github/contributors/jamtax/FileFlip)
161+
![Last Commit](https://img.shields.io/github/last-commit/jamtax/FileFlip)
162+
![Repo Size](https://img.shields.io/github/repo-size/jamtax/FileFlip)
163+
![Visitors](https://visitor-badge.laobi.icu/badge?page_id=jamtax.FileFlip)
164+
165+
---
166+
167+
### 📜 License
168+
169+
Licensed under the [MIT License](https://github.com/jamtax/FileFlip/blob/main/LICENSE)
170+
171+
---
172+
173+
<p align="center">
174+
Built with 💡 by <a href="https://skunkworks.africa" target="_blank">Skunkworks Africa</a> for <a href="https://jamtax.co.za" target="_blank">Jamtax</a>.
175+
</p>
176+
```
177+
178+
---
179+
180+
## ✅ Next Steps
181+
182+
You can:
183+
184+
1. Replace your current `README.md` with this version.
185+
2. Run:
186+
187+
```bash
188+
git add README.md
189+
git commit -m "Enhanced README with visual design and badges"
190+
git push origin main
191+
```
192+

apphosting.emulator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
env:
2+
#- variable: ENV_VAR_NAME
3+
# value: plaintext value
4+
#- variable: SECRET_ENV_VAR_NAME
5+
# secret: cloud-secret-manager-id

apphosting.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Settings for Backend (on Cloud Run).
2+
# See https://firebase.google.com/docs/app-hosting/configure#cloud-run
3+
runConfig:
4+
minInstances: 0
5+
# maxInstances: 100
6+
# concurrency: 80
7+
# cpu: 1
8+
# memoryMiB: 512
9+
10+
# Environment variables and secrets.
11+
# env:
12+
# Configure environment variables.
13+
# See https://firebase.google.com/docs/app-hosting/configure#user-defined-environment
14+
# - variable: MESSAGE
15+
# value: Hello world!
16+
# availability:
17+
# - BUILD
18+
# - RUNTIME
19+
20+
# Grant access to secrets in Cloud Secret Manager.
21+
# See https://firebase.google.com/docs/app-hosting/configure#secret-parameters
22+
# - variable: MY_SECRET
23+
# secret: mySecretRef

assets/favicon.ico

69.6 KB
Binary file not shown.

database.rules.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
/* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
3+
"rules": {
4+
".read": false,
5+
".write": false
6+
}
7+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Generated TypeScript README
2+
This README will guide you through the process of using the generated JavaScript SDK package for the connector `default`. It will also provide examples on how to use your generated SDK to call your Data Connect queries and mutations.
3+
4+
**If you're looking for the `React README`, you can find it at [`default-connector/react/README.md`](./react/README.md)**
5+
6+
***NOTE:** This README is generated alongside the generated SDK. If you make changes to this file, they will be overwritten when the SDK is regenerated.*
7+
8+
# Table of Contents
9+
- [**Overview**](#generated-javascript-readme)
10+
- [**Accessing the connector**](#accessing-the-connector)
11+
- [*Connecting to the local Emulator*](#connecting-to-the-local-emulator)
12+
- [**Queries**](#queries)
13+
- [**Mutations**](#mutations)
14+
15+
# Accessing the connector
16+
A connector is a collection of Queries and Mutations. One SDK is generated for each connector - this SDK is generated for the connector `default`. You can find more information about connectors in the [Data Connect documentation](https://firebase.google.com/docs/data-connect#how-does).
17+
18+
You can use this generated SDK by importing from the package `@firebasegen/default-connector` as shown below. Both CommonJS and ESM imports are supported.
19+
20+
You can also follow the instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#set-client).
21+
22+
```typescript
23+
import { getDataConnect } from 'firebase/data-connect';
24+
import { connectorConfig } from '@firebasegen/default-connector';
25+
26+
const dataConnect = getDataConnect(connectorConfig);
27+
```
28+
29+
## Connecting to the local Emulator
30+
By default, the connector will connect to the production service.
31+
32+
To connect to the emulator, you can use the following code.
33+
You can also follow the emulator instructions from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#instrument-clients).
34+
35+
```typescript
36+
import { connectDataConnectEmulator, getDataConnect } from 'firebase/data-connect';
37+
import { connectorConfig } from '@firebasegen/default-connector';
38+
39+
const dataConnect = getDataConnect(connectorConfig);
40+
connectDataConnectEmulator(dataConnect, 'localhost', 9399);
41+
```
42+
43+
After it's initialized, you can call your Data Connect [queries](#queries) and [mutations](#mutations) from your generated SDK.
44+
45+
# Queries
46+
47+
No queries were generated for the `default` connector.
48+
49+
If you want to learn more about how to use queries in Data Connect, you can follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#using-queries).
50+
51+
# Mutations
52+
53+
No mutations were generated for the `default` connector.
54+
55+
If you want to learn more about how to use mutations in Data Connect, you can follow the examples from the [Data Connect documentation](https://firebase.google.com/docs/data-connect/web-sdk#using-mutations).
56+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
export const connectorConfig = {
3+
connector: 'default',
4+
service: 'FileFlip',
5+
location: 'asia-east1'
6+
};
7+

0 commit comments

Comments
 (0)