Skip to content

liam1205/LegalTechSTART

Repository files navigation

StartHackLegalTech

A monorepo for a LegalTech starter application with a Next.js frontend and a NestJS backend.

Repository structure

  • frontend/ — Next.js 16 application
  • backend/ — NestJS 11 API server
  • docker-compose.yml — local Docker development setup for both services
  • docker-compose.neo4j.yml — standalone Neo4j container for the Graph RAG system

Tech stack

  • Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, Axios, shadcn/ui, Radix UI.
  • Backend: NestJS 11, TypeScript, TypeORM, PostgreSQL, Passport, JWT, Supabase SDK, bcrypt.
  • Graph RAG: Neo4j 5 plus OpenAI embeddings and LLM-based graph extraction

Prerequisites

  • Node.js 20+ and npm
  • Docker and Docker Compose for containerized development
  • Git for source control

Each service manages dependencies independently. Run installs inside each folder.

Local development using npm

Frontend

cd frontend
npm install
cp .env.example .env
npm run dev

Open http://localhost:5173

Backend

cd backend
npm install
cp .env.example .env
npm run dev

Open http://localhost:3000

If you want to use the Graph RAG features, start Neo4j separately:

docker compose -f docker-compose.neo4j.yml up -d

When the backend runs inside Docker, point backend/config/graph-rag.config.json at http://host.docker.internal:7474 instead of http://localhost:7474.

Running both locally

Open two terminals and start both services from their folders:

cd frontend && npm run dev
cd backend && npm run dev

Docker development

From the repository root:

docker compose up --build

This starts both services with live reload enabled:

  • Frontend: http://localhost:5173
  • Backend: http://localhost:3000

Stop and remove containers:

docker compose down

Stop the external Neo4j container:

docker compose -f docker-compose.neo4j.yml down

Notes

  • The repository mounts source code into containers so edits are reflected immediately.
  • If you need to change environment variables, update frontend/.env and backend/.env after copying from .env.example.
  • Graph RAG settings live in backend/config/graph-rag.config.json.
  • The hybrid Graph RAG also requires OPENAI_API_KEY in backend/.env.
  • For setup and usage of the hybrid GraphRAG flow, see GraphRAG.md.

Useful scripts

Frontend

  • npm run dev — start the frontend in development mode
  • npm run build — build the production frontend
  • npm run lint — lint frontend source files

Backend

  • npm run start — start the backend server
  • npm run dev — start NestJS in watch mode
  • npm run build — compile the backend
  • npm run lint — lint backend source files
  • npm test — run unit tests
  • npm run test:e2e — run end-to-end tests

Getting help

If you run into issues, first check that:

  • Node and npm are installed
  • .env files have been created from .env.example
  • Docker is running when using Docker Compose

If problems persist, inspect container logs with docker compose logs or open an issue in the repository.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages