Skip to content

Commit bbfcda2

Browse files
committed
init api and web app
1 parent eba33e1 commit bbfcda2

40 files changed

+4804
-139
lines changed

apps/api/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# prod
2+
dist/
3+
4+
# dev
5+
.yarn/
6+
!.yarn/releases
7+
.vscode/*
8+
!.vscode/launch.json
9+
!.vscode/*.code-snippets
10+
.idea/workspace.xml
11+
.idea/usage.statistics.xml
12+
.idea/shelf
13+
14+
# deps
15+
node_modules/
16+
.wrangler
17+
18+
# env
19+
.env
20+
.env.production
21+
.dev.vars
22+
23+
# logs
24+
logs/
25+
*.log
26+
npm-debug.log*
27+
yarn-debug.log*
28+
yarn-error.log*
29+
pnpm-debug.log*
30+
lerna-debug.log*
31+
32+
# misc
33+
.DS_Store

apps/api/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@hypr/api",
3+
"type": "module",
4+
"scripts": {
5+
"dev": "wrangler dev",
6+
"deploy": "wrangler deploy --minify",
7+
"cf-typegen": "wrangler types --env-interface CloudflareBindings"
8+
},
9+
"dependencies": {
10+
"hono": "^4.9.10"
11+
},
12+
"devDependencies": {
13+
"wrangler": "^4.4.0"
14+
}
15+
}

apps/api/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Hono } from "hono";
2+
3+
const app = new Hono();
4+
5+
app.get("/", (c) => {
6+
return c.text("Hello Hono!");
7+
});
8+
9+
export default app;

apps/api/tsconfig.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"strict": true,
7+
"skipLibCheck": true,
8+
"lib": [
9+
"ESNext"
10+
],
11+
"jsx": "react-jsx",
12+
"jsxImportSource": "hono/jsx"
13+
}
14+
}

apps/api/wrangler.jsonc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "node_modules/wrangler/config-schema.json",
3+
"name": "api",
4+
"main": "src/index.ts",
5+
"compatibility_date": "2025-10-06",
6+
// "compatibility_flags": [
7+
// "nodejs_compat"
8+
// ],
9+
// "vars": {
10+
// "MY_VAR": "my-variable"
11+
// },
12+
// "kv_namespaces": [
13+
// {
14+
// "binding": "MY_KV_NAMESPACE",
15+
// "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
16+
// }
17+
// ],
18+
// "r2_buckets": [
19+
// {
20+
// "binding": "MY_BUCKET",
21+
// "bucket_name": "my-bucket"
22+
// }
23+
// ],
24+
// "d1_databases": [
25+
// {
26+
// "binding": "MY_DB",
27+
// "database_name": "my-database",
28+
// "database_id": ""
29+
// }
30+
// ],
31+
// "ai": {
32+
// "binding": "AI"
33+
// },
34+
// "observability": {
35+
// "enabled": true,
36+
// "head_sampling_rate": 1
37+
// }
38+
}

apps/web/.cursorrules

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
We use Sentry for watching for errors in our deployed application, as well as for instrumentation of our application.
2+
3+
## Error collection
4+
5+
Error collection is automatic and configured in `src/router.tsx`.
6+
7+
## Instrumentation
8+
9+
We want our server functions instrumented. So if you see a function name like `createServerFn`, you can instrument it with Sentry. You'll need to import `Sentry`:
10+
11+
```tsx
12+
import * as Sentry from '@sentry/tanstackstart-react'
13+
```
14+
15+
And then wrap the implementation of the server function with `Sentry.startSpan`, like so:
16+
17+
```tsx
18+
Sentry.startSpan({ name: 'Requesting all the pokemon' }, async () => {
19+
// Some lengthy operation here
20+
await fetch('https://api.pokemon.com/data/')
21+
})
22+
```

apps/web/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
count.txt
7+
.env
8+
.nitro
9+
.tanstack
10+
.output
11+
.vinxi
12+
todos.json

apps/web/package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "web",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite dev --port 3000",
7+
"build": "vite build",
8+
"serve": "vite preview",
9+
"test": "vitest run",
10+
"deploy": "wrangler deploy"
11+
},
12+
"dependencies": {
13+
"@cloudflare/vite-plugin": "^1.13.8",
14+
"@sentry/tanstackstart-react": "^10.17.0",
15+
"@t3-oss/env-core": "^0.13.8",
16+
"@tailwindcss/vite": "^4.0.6",
17+
"@tanstack/react-devtools": "^0.7.0",
18+
"@tanstack/react-query": "^5.66.5",
19+
"@tanstack/react-query-devtools": "^5.84.2",
20+
"@tanstack/react-router": "^1.132.0",
21+
"@tanstack/react-router-devtools": "^1.132.0",
22+
"@tanstack/react-router-ssr-query": "^1.131.7",
23+
"@tanstack/react-start": "^1.132.0",
24+
"@tanstack/router-plugin": "^1.132.0",
25+
"lucide-react": "^0.544.0",
26+
"react": "^19.0.0",
27+
"react-dom": "^19.0.0",
28+
"tailwindcss": "^4.0.6",
29+
"vite-tsconfig-paths": "^5.1.4",
30+
"zod": "^4.1.11"
31+
},
32+
"devDependencies": {
33+
"@testing-library/dom": "^10.4.0",
34+
"@testing-library/react": "^16.2.0",
35+
"@types/node": "^22.10.2",
36+
"@types/react": "^19.0.8",
37+
"@types/react-dom": "^19.0.3",
38+
"@vitejs/plugin-react": "^5.0.4",
39+
"jsdom": "^27.0.0",
40+
"typescript": "^5.7.2",
41+
"vite": "^7.1.7",
42+
"vitest": "^3.0.5",
43+
"web-vitals": "^5.1.0",
44+
"wrangler": "^4.40.3"
45+
}
46+
}

apps/web/public/favicon.ico

3.78 KB
Binary file not shown.

apps/web/public/logo192.png

5.22 KB
Loading

0 commit comments

Comments
 (0)