feat: initialize monorepo structure with Bun and Turborepo

- Add package.json for the root with workspace configuration and scripts
- Create @gruperly/config package with TypeScript configuration
- Establish shared package @gruperly/shared with Zod schemas for validation
- Implement group, student, and payment schemas using Zod
- Set up TypeScript configuration for shared package
- Document stack architecture and technical specifications in stack.md
- Configure Turborepo with build, dev, lint, and typecheck tasks
This commit is contained in:
Jose Selesan
2026-08-28 17:03:53 -03:00
parent 52b3074631
commit ed8d280995
50 changed files with 1660 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
import { PrismaClient } from '@prisma/client'
export const prisma = new PrismaClient()

3
apps/api/src/db/index.ts Normal file
View File

@@ -0,0 +1,3 @@
import { prisma } from './client'
export { prisma }

30
apps/api/src/index.ts Normal file
View File

@@ -0,0 +1,30 @@
import { Hono } from 'hono'
import { cors } from 'hono/cors'
import { authRoutes } from './routes/auth'
import { groupsRoutes } from './routes/groups'
import { studentsRoutes } from './routes/students'
import { paymentsRoutes } from './routes/payments'
import { waitlistRoutes } from './routes/waitlist'
const app = new Hono()
app.use('*', cors())
app.get('/', (c) => c.json({ name: 'Gruperly API', status: 'ok' }))
app.route('/auth', authRoutes)
app.route('/groups', groupsRoutes)
app.route('/students', studentsRoutes)
app.route('/payments', paymentsRoutes)
app.route('/waitlist', waitlistRoutes)
export default app
const port = Number(Bun.env.PORT ?? 4000)
Bun.serve({
port,
fetch: app.fetch,
})
console.log(`Gruperly API running on http://localhost:${port}`)

View File

@@ -0,0 +1,5 @@
import { Hono } from 'hono'
export const authRoutes = new Hono()
authRoutes.get('/session', (c) => c.json({ message: 'placeholder' }))

View File

@@ -0,0 +1,5 @@
import { Hono } from 'hono'
export const groupsRoutes = new Hono()
groupsRoutes.get('/', (c) => c.json([]))

View File

@@ -0,0 +1,5 @@
import { Hono } from 'hono'
export const paymentsRoutes = new Hono()
paymentsRoutes.get('/', (c) => c.json([]))

View File

@@ -0,0 +1,5 @@
import { Hono } from 'hono'
export const studentsRoutes = new Hono()
studentsRoutes.get('/', (c) => c.json([]))

View File

@@ -0,0 +1,5 @@
import { Hono } from 'hono'
export const waitlistRoutes = new Hono()
waitlistRoutes.get('/', (c) => c.json([]))