Skip to content

Commit 071997f

Browse files
nedimfclaude
andcommitted
Initial commit: isolate @appgram/react to standalone repo
Extracted from monorepo with CI/CD pipeline for npm publishing. Includes source, demo app, examples, and GitHub Actions workflows for CI (build + typecheck) and npm publish on version tags. Fixed DTS build errors: replaced NodeJS.Timeout with ReturnType<typeof setInterval> and coerced null fingerprint to undefined. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 parents  commit 071997f

81 files changed

Lines changed: 20868 additions & 0 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18, 20]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Typecheck
33+
run: npm run typecheck

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: npm
24+
registry-url: https://registry.npmjs.org
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Publish
33+
run: npm publish --access public
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
5+
6+
# Build
7+
dist
8+
dist-ssr
9+
*.local
10+
11+
# Generated docs
12+
docs.json
13+
react-sdk.json
14+
15+
# Environment
16+
.env
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
# Logs
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
pnpm-debug.log*
27+
28+
# Editor
29+
.vscode
30+
.idea
31+
*.suo
32+
*.ntvs*
33+
*.njsproj
34+
*.sln
35+
*.sw?
36+
37+
# OS
38+
.DS_Store
39+
Thumbs.db
40+
41+
# Testing
42+
coverage
43+
44+
# TypeScript
45+
*.tsbuildinfo
46+
47+
# Misc
48+
*.pem

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

demo/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# @appgram/react Demo
2+
3+
Interactive demo app for testing the `@appgram/react` library.
4+
5+
## Quick Start
6+
7+
From the `packages/appgram-react` directory:
8+
9+
```bash
10+
# Option 1: Full setup (builds library + installs demo + runs)
11+
npm run demo
12+
13+
# Option 2: Step by step
14+
npm install # Install library dependencies
15+
npm run build # Build the library
16+
cd demo
17+
npm install # Install demo dependencies
18+
npm run dev # Start demo at http://localhost:5173
19+
```
20+
21+
## Configuration
22+
23+
Edit `demo/src/App.tsx` to update the config:
24+
25+
```tsx
26+
const CONFIG = {
27+
projectId: 'your_project_id', // Your Appgram project ID
28+
orgSlug: 'your_org', // Your organization slug
29+
projectSlug: 'your_project', // Your project slug
30+
// apiUrl: 'http://localhost:3000', // For local API testing
31+
}
32+
```
33+
34+
## What's Included
35+
36+
The demo showcases:
37+
38+
1. **Components Tab** - Pre-built `WishList` with search, filters, and click handling
39+
2. **Hooks Tab** - Custom UI built with `useWishes` and `useVote` hooks
40+
3. **Roadmap Tab** - `RoadmapBoard` component in kanban layout
41+
4. **Releases Tab** - `ReleaseList` component in timeline layout
42+
5. **Help Tab** - `HelpCollections` component with search
43+
6. **Support Tab** - `SupportForm` for ticket submission
44+
45+
## Development
46+
47+
To develop the library and see changes in the demo:
48+
49+
**Terminal 1** (library watch mode):
50+
```bash
51+
cd packages/appgram-react
52+
npm run dev
53+
```
54+
55+
**Terminal 2** (demo dev server):
56+
```bash
57+
cd packages/appgram-react/demo
58+
npm run dev
59+
```
60+
61+
Changes to library files will trigger a rebuild, and Vite will hot-reload the demo.
62+
63+
## Testing with Mock Data
64+
65+
If you don't have an Appgram project, the components will show loading states and then empty/error states. To test the UI:
66+
67+
1. Set up a local Appgram API server
68+
2. Update `CONFIG.apiUrl` to point to your local server
69+
3. Or create a test project at appgram.dev

demo/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>@appgram/react Demo</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)