L is a very simple untyped functional programming language based on lambda calculus for evaluating simple math expressions.
This project puts a web interface to the interpreter.

This project contains:
- β
A Haskell Scotty server (
l-lang
) - β
A Vite + React client (
web-client
) - β Docker + Docker Compose configuration to run both together
- β Standalone mode for deploying without the Haskell server
./ β Haskell Scotty app (with Dockerfile)
/web-client β Vite + React app (with Dockerfile)
docker-compose.yml β top-level orchestration
- Install Docker β https://docs.docker.com/get-docker/
- Install Docker Compose β included in recent Docker Desktop versions
For standalone mode:
- Install Node.js (v18 or higher) β https://nodejs.org/
1οΈβ£ Clone the repository:
git clone https://github.com/claeusdev/l-lang
cd l-lang
2οΈβ£ Build and start everything:
docker compose up --build
β This will:
-
Build the server from the Haskell Dockerfile.
-
Build the client from the React Dockerfile.
-
Expose:
- Server β http://localhost:3000
- Client (Vite dev server) β http://localhost:5173
π Perfect for production deployments or when you just want to try the L language!
1οΈβ£ Navigate to the web client:
cd web-client
2οΈβ£ Install dependencies:
npm install
3οΈβ£ Build the standalone version:
# Using the build script (recommended)
./build-standalone.sh
# Or manually
npm run build:standalone
4οΈβ£ Serve the standalone app:
# Using the built-in server
npm run serve:standalone
# Or using the executable script directly
./standalone-server.js
# Or serve with any static file server
npx serve dist
β Standalone Features:
- π Offline L language interpreter - No backend required!
- π Sample code snippets with valid L language syntax
- πΎ Local storage for saving your code snippets
- π¨ Full UI functionality including Monaco editor
- π± Responsive design works on mobile and desktop
Access the standalone app: http://localhost:8080
Service | Local URL | Description |
---|---|---|
Full Stack Client | http://localhost:5173 | React app with Haskell backend |
Haskell Server | http://localhost:3000 | API server (development) |
Standalone App | http://localhost:8080 | Self-contained React app |
The standalone app comes with built-in sample snippets demonstrating L language syntax:
x = 10
y = 20
x + y
x * y
double = \x -> x * 2
triple = \x -> x * 3
square = \x -> x * x
double 5
triple 4
square 6
double = \x -> x * 2
triple = \x -> x * 3
compose = \f -> \g -> \x -> f (g x)
doubleTriple = compose double triple
doubleTriple 5
double = \x -> x * 2
let x = 10 in double x
let y = 5 in let z = y + 3 in z * 2
double = \x -> x * 2
triple = \x -> x * x * x
compose = \f -> \g -> \x -> f (g x)
composedDoubleTriple = compose double
trippledDoubledComposed = composedDoubleTriple triple
trippledDoubledComposed 5
let x = 100 in trippledDoubledComposed (double 10)
-
Stop the services:
docker-compose down
-
Rebuild only:
docker-compose build
-
View logs:
docker-compose logs -f
-
Restart with rebuild:
docker-compose up --build
-
Development mode:
cd web-client npm run dev
-
Build for production:
cd web-client npm run build:standalone
-
Serve built app:
cd web-client npm run serve:standalone
The standalone build creates a dist
folder that can be deployed to any static hosting service:
- Netlify
- Vercel
- GitHub Pages
- AWS S3 + CloudFront
- Any web server (Apache, Nginx)
Use the included standalone-server.js
script on any Node.js server:
# On your server
cd web-client
npm install --production
npm run build:standalone
node standalone-server.js
Build a lightweight Docker image for the standalone app:
FROM node:18-alpine
WORKDIR /app
COPY web-client/package*.json ./
RUN npm install --production
COPY web-client/dist ./dist
COPY web-client/standalone-server.js ./
EXPOSE 8080
CMD ["node", "standalone-server.js"]