Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Material Forms Backend

REST API for Material Forms, a form-builder application. Built with ElysiaJS, Prisma, and PostgreSQL, running on the Bun runtime.

Features

  • JWT authentication (register, login, session)
  • Form CRUD with publish/close lifecycle
  • Public form submission with required-field validation
  • Per-form analytics and CSV export
  • Rate limiting on submissions
  • OpenAPI documentation (Scalar UI at /openapi)

Prerequisites

  • Bun v1.0+
  • PostgreSQL database

Setup

  1. Clone and install dependencies
git clone https://github.com/Frsxk/material-backend.git
cd material-backend
bun install
  1. Configure environment variables

Create a .env file in the project root:

DATABASE_URL="postgresql://user:password@localhost:5432/material_forms"
JWT_SECRET="your-secret-key"
  1. Run database migrations
bunx prisma migrate deploy
  1. Start the development server
bun run dev

The API will be available at http://localhost:5000.

Scripts

Command Description
bun run dev Start dev server with watch mode
bun test Run integration tests
bunx prisma migrate dev Create a new migration
bunx prisma migrate deploy Apply pending migrations

About

Form Builder Website for RISTEK WebDev Recruitment (Back-End)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages