Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Environment
NODE_ENV=development

# Server
PORT=8000
LOG_LEVEL=debug

# Database
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE

# Better Auth
BETTER_AUTH_SECRET=your-secret-key-here
BETTER_AUTH_URL=http://localhost:8000

# OAuth (Google)
GOOGLE_CLIENT_ID=your-client-id-here
GOOGLE_CLIENT_SECRET=yout-client-secret-here
34 changes: 17 additions & 17 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ on:
push:
branches: [ main ]
paths:
- 'backend/**'
- 'src/**'
- 'prisma/**'
- 'package.json'
- 'bun.lock'
- 'tsconfig.json'
pull_request:
branches: [ main ]
paths:
- 'backend/**'
- 'src/**'
- 'prisma/**'
- 'package.json'
- 'bun.lock'
- 'tsconfig.json'

jobs:
backend-ci:
Expand Down Expand Up @@ -42,48 +50,40 @@ jobs:
uses: actions/cache@v4
with:
path: |
backend/node_modules
backend/.bun
node_modules
.bun
~/.bun/install/cache
backend/prisma/generated
key: ${{ runner.os }}-bun-${{ hashFiles('backend/bun.lock', 'backend/package.json', 'backend/tsconfig.json') }}
prisma/generated
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'package.json', 'tsconfig.json') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
working-directory: ./backend
run: bun install

- name: Generate Prisma client
working-directory: ./backend
run: bunx prisma generate
env:
DATABASE_URL: postgresql://postgres:1234@localhost:5432/test_db

- name: Code quality check (Biome)
working-directory: ./backend
run: bun run check

- name: Type checking
working-directory: ./backend
run: bun run typecheck

- name: Run database migrations
working-directory: ./backend
run: bunx prisma migrate deploy
env:
DATABASE_URL: postgresql://postgres:1234@localhost:5432/test_db

- name: Security audit
working-directory: ./backend
run: bun audit

- name: Build application
working-directory: ./backend
run: bun run build

- name: Build verification
working-directory: ./backend
run: |
# Verify the built application can start without errors
timeout 10s bun dist/index.js || true
Expand All @@ -94,6 +94,6 @@ jobs:
with:
name: backend-build-artifacts
path: |
backend/dist/
backend/prisma/generated/
retention-days: 7
dist/
prisma/generated/
retention-days: 7
35 changes: 0 additions & 35 deletions .github/workflows/frontend.yml

This file was deleted.

26 changes: 8 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# Node and Bun dependencies
# Usually, you should commit the lockfile to ensure reproducible builds.
# If you want to commit it, remove 'bun.lockb' from this file.
node_modules/

# Build and distribution output
/dist
backend/dist/
/dist-ssr
/build
/out
/.next/
/.nitro/
.vercel/
.wrangler/
dist/
build/
out/
coverage/

# Environment variables
# Don't commit .env files. Use .env.example for templates.
.env
.env.*
!.env.example
Expand All @@ -33,20 +25,18 @@ yarn-error.log*
*.ntvs*
*.njsproj
*.sln
o

# OS-generated files
.DS_Store
Thumbs.db

# Temporary and generated files
/coverage
/.pnp
.pnp.js
*.tmp
*.temp
*.pem
*.trace
*.zip
*.tar.gz
*.tgz
count.txt
/src/generated/prisma
/.tanstack/
/src/generated/prisma
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ The platform helps colleges efficiently collect data for use cases such as event

## Features

- Drag-and-drop form builder
- Support for multiple field types
- Built-in validation rules for accurate data collection
- Real-time form preview before publishing
Expand All @@ -19,3 +18,49 @@ The platform helps colleges efficiently collect data for use cases such as event

---

## Getting Started

### Prerequisites

- [Bun](https://bun.sh/) (latest version)
- [Docker](https://www.docker.com/) (for running the database)

### Installation

1. Clone the repository:
```bash
git clone <https://github.com/Nandgopal-R/form-engine.git>
cd form-engine
```

2. Install dependencies:
```bash
bun install
```

3. Set up the environment variables:
- Copy `.env.example` to `.env` and fill in with your secret keys.

4. Start the database:
```bash
docker-compose up -d
```

5. Run database migrations:
```bash
bunx prisma migrate dev
```

### Development Scripts

- `bun run dev`: Start the development server with hot-reloading.
- `bun run check`: Run Biome for linting and formatting checks.
- `bun run typecheck`: Run TypeScript type checking.
- `bun run build`: Build the application for production.

### Project Structure

- `src/`: Backend source code.
- `prisma/`: Database schema and migrations.
- `bruno/`: Bruno API collection for testing endpoints.
- `dist/`: Production build output.
6 changes: 0 additions & 6 deletions backend/.env.example

This file was deleted.

20 changes: 0 additions & 20 deletions backend/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions backend/README.md

This file was deleted.

Loading