Skip to content

Commit f778fc3

Browse files
Merge pull request #1 from chandanrattan/feat/mvp
feat: MVP changes
2 parents 7a36c22 + 653010b commit f778fc3

File tree

15 files changed

+25308
-2
lines changed

15 files changed

+25308
-2
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
<!--- Before opening up a new bug report, please make sure to check for similar existing issues -->
10+
11+
**Description:**
12+
A clear and concise description of what the bug is.
13+
14+
**Action version:**
15+
Specify the action version
16+
17+
**Platform:**
18+
19+
- [ ] Ubuntu
20+
- [ ] macOS
21+
- [ ] Windows
22+
23+
**Runner type:**
24+
25+
- [ ] Hosted
26+
- [ ] Self-hosted
27+
28+
**Tools version:**
29+
30+
<!--- Please specify versions of node and package manager (npm, yarn, pnpm and etc)-->
31+
32+
**Repro steps:**
33+
A description with steps to reproduce the issue. If you have a public example or repo to share, please provide the link.
34+
35+
**Expected behavior:**
36+
A description of what you expected to happen.
37+
38+
**Actual behavior:**
39+
A description of what is actually happening.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: feature request
6+
assignees: ""
7+
---
8+
9+
<!--- Before opening up a new feature request, please make sure to check for similar existing issues and pull requests -->
10+
11+
**Description:**
12+
Describe your proposal.
13+
14+
**Justification:**
15+
Justification or a use case for your proposal.
16+
17+
**Are you willing to submit a PR?**
18+
19+
<!--- We accept contributions! -->

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lipika CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [18, 20, 22]
14+
#os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Verify formatting
27+
run: npm run format:check

.github/workflows/ph-pages.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
node-version: [18, 20, 22]
22+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm install
29+
- run: npm run build
30+
- uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: "./build"
33+
- uses: actions/deploy-pages@v4

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,29 @@ FodyWeavers.xsd
404404

405405
# JetBrains Rider
406406
*.sln.iml
407+
# Node.js
408+
node_modules/
409+
npm-debug.log*
410+
411+
# React
412+
build/
413+
.env
414+
415+
# Electron
416+
dist/
417+
out/
418+
*.asar
419+
420+
# macOS/Linux/Windows
421+
.DS_Store
422+
Thumbs.db
423+
424+
# VSCode
425+
.vscode/
426+
427+
# Logs
428+
logs/
429+
*.log
430+
431+
# Others
432+
*.local

README.md

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,100 @@
1-
# patra
2-
Alternative Tool for Editing your documentations and PDF Files
1+
# 📝 Lipika – Open Source PDF Editor
2+
3+
**Lipika** (लिपिका) is a lightweight, browser-based PDF editor built with React and powered by [pdf-lib](https://pdf-lib.js.org/). It allows users to upload, annotate, highlight, sign, and save PDF files without any server involvement. The name _Lipika_ means "scribe" or "writer" in Sanskrit.
4+
5+
---
6+
7+
## 🚀 Features
8+
9+
- 📥 Upload and view any PDF
10+
- ✍️ Add highlights to text
11+
- ✒️ Insert signature placeholders
12+
- 🎨 Draw lines and shapes
13+
- ↩️ Undo last action
14+
- 💾 Save the edited PDF locally
15+
- 🧠 In-memory editing using `pdf-lib`
16+
- 🔐 No data leaves your device (privacy-first)
17+
18+
---
19+
20+
## 📸 Demo Preview
21+
22+
> Upload a PDF, edit it in-browser, and download the modified version instantly!
23+
24+
![Lipika Demo Screenshot](./screenshot.png) <!-- Add screenshot in repo -->
25+
26+
---
27+
28+
## 🛠 Tech Stack
29+
30+
- **Frontend**: React
31+
- **PDF Engine**: [pdf-lib](https://pdf-lib.js.org/)
32+
- **Styling**: CSS (Tailwind optional in future roadmap)
33+
34+
---
35+
36+
## 📦 Installation
37+
38+
```bash
39+
git clone https://github.com/chandanrattan/lipika.git
40+
cd lipika
41+
npm install
42+
npm start
43+
```
44+
45+
Visit `http://localhost:3000` to start using the app locally.
46+
47+
---
48+
49+
## 📁 Project Structure
50+
51+
```
52+
lipika/
53+
├── .github/
54+
│ └── workflows/
55+
│ └── node.js.yml # GitHub Actions CI setup
56+
├── public/ # Static files
57+
├── src/ # React components & logic
58+
│ ├── App.js # Main app component
59+
│ └── App.css # Basic styling
60+
├── .gitignore
61+
├── package.json
62+
├── README.md
63+
└── LICENSE # Apache License 2.0
64+
```
65+
66+
---
67+
68+
## 📌 Roadmap
69+
70+
- [ ] Text box annotations
71+
- [ ] Signature image upload
72+
- [ ] Drawing canvas with eraser
73+
- [ ] Multi-page PDF editing
74+
- [ ] Export to images (PNG/JPG)
75+
- [ ] Dark mode support
76+
77+
---
78+
79+
## 📄 License
80+
81+
This project is licensed under the **Apache License 2.0**. Please read [LICENSE](./LICENSE) for details.
82+
83+
> _Modifications and redistributions are allowed with attribution. For any commercial or extended use, kindly contact the maintainer._
84+
85+
---
86+
87+
## 🤝 Contributing
88+
89+
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
90+
91+
---
92+
93+
## 💬 Connect
94+
95+
- Project Lead: [Chandan Bhardwaj](https://github.com/chandanrattan)
96+
- Issues & Feedback: [GitHub Issues](https://github.com/chandanrattan/lipika/issues)
97+
98+
---
99+
100+
**Lipika**_Write. Highlight. Sign. All in your browser._

electron/main.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const { app, BrowserWindow } = require("electron");
2+
const path = require("path");
3+
const isDev = !app.isPackaged;
4+
5+
function createWindow() {
6+
const win = new BrowserWindow({
7+
width: 1000,
8+
height: 800,
9+
webPreferences: {
10+
preload: path.join(__dirname, "preload.js"),
11+
nodeIntegration: true,
12+
contextIsolation: false,
13+
},
14+
});
15+
16+
const appURL = isDev
17+
? "http://localhost:3000"
18+
: `file://${path.join(__dirname, "../build/index.html")}`;
19+
20+
win.loadURL(appURL);
21+
}
22+
23+
app.whenReady().then(createWindow);
24+
25+
app.on("window-all-closed", () => {
26+
if (process.platform !== "darwin") app.quit();
27+
});

electron/preload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
window.require = require;

0 commit comments

Comments
 (0)