Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HMSCC - Hash Map Scripting Compiler Collection

πŸš€ Quick Start: Deploy to Render (15 minutes)

Step 1: Push to GitHub (2 minutes)

cd D:\Projects\HMSCC
git add .
git commit -m "Production: Fix dependencies and optimize for Render"
git push origin main

Step 2: Create Render Service (3 minutes)

  1. Go to https://render.com/dashboard
  2. Click + New β†’ Web Service
  3. Search and select: HarshMrigank/HMSCC
  4. Fill in:
    • Name: hmscc-backend
    • Environment: Docker ⭐ (important)
    • Region: Oregon
    • Branch: main
  5. Click Create Web Service

Step 3: Wait & Verify (10 minutes)

  1. Click your service in Render
  2. Go to Logs tab
  3. Wait for status to show Live (green)
  4. Test health endpoint: https://your-service-name.onrender.com/health
  5. Should return: {"status":"ok","compiler":"available"}

βœ… Your backend is now live on Render! πŸŽ‰


πŸ“‹ Complete Setup Guide

What's Included

Component Status Location
Frontend βœ… Running Port 5174 (React + CodeMirror)
Backend βœ… Running Port 5001 (Node.js/Express)
Compiler βœ… Ready C++11 with CMake
Docker βœ… Optimized Multi-stage build for Render

Local Setup (If Starting Fresh)

# Frontend
cd frontend && npm install && npm run dev        # Port 5174

# Backend (new terminal)
cd backend && npm install && npm start           # Port 5001

What Was Fixed

βœ… Dependencies: Added 9 missing CodeMirror packages (@codemirror/language, lang-css, lang-html, autocomplete, language-data, axios)
βœ… Dockerfile: Production-optimized (port 5001, compiler path, npm ci)
βœ… Frontend: No errors, all imports resolve
βœ… Backend: Fully operational, health check working


πŸ› οΈ Render Settings

Automatic Detection

Render automatically detects:

  • βœ… Dockerfile in repository root
  • βœ… Port 5001 from EXPOSE directive
  • βœ… Start command from CMD directive
  • βœ… Multi-stage build process

Deployment Flow

git push β†’ GitHub β†’ Render webhook β†’ Docker build β†’ 
Deploy container β†’ Live on Render
Auto-Deploy: Every git push = auto redeploy

πŸ§ͺ Verification Tests

Test 1: Health Check

curl https://your-service-name.onrender.com/health
# {"status":"ok","compiler":"available"}

Test 2: API Test

curl -X POST https://your-service-name.onrender.com/compile `
  -H "Content-Type: application/json" `
  -Body '{"code":"arena () { speak 42; }"}'
# {"success":true,"output":"42\n",...}

Test 3: Browser

Open: https://your-service-name.onrender.com/health


🚨 Troubleshooting

Issue Solution
Build fails Check Build Logs, fix error, git push
Service won't start Check Logs, verify environment
API doesn't respond Wait 30 sec, check /health
Port errors Render manages ports automatically
Git push fails Verify credentials

πŸ“ Project Structure

HMSCC/
β”œβ”€β”€ dockerfile              ← Main deployment file
β”œβ”€β”€ frontend/               ← React (port 5174)
β”‚   β”œβ”€β”€ package.json
β”‚   └── src/
β”œβ”€β”€ backend/                ← Node.js API (port 5001)
β”‚   β”œβ”€β”€ package.json
β”‚   └── server.js
β”œβ”€β”€ compiler/               ← C++ compiler
β”‚   └── CMakeLists.txt
β”œβ”€β”€ README.md               ← This file
└── HMSCC_TEST_CASES.md     ← Example programs

πŸ”„ Deployment Workflow

Initial: git push β†’ Render builds β†’ Deploy (5-10 min)
Future: git push β†’ Render auto-redeploys (2-5 min)
No manual steps needed after first deployment!


πŸ“ˆ Plans

Plan Cost Auto-on Use Case
Free $0/month No (spins down) Development
Starter $7/month Yes Production

πŸ“ API

Health

GET /health β†’ {"status":"ok","compiler":"available"}

Compile

POST /compile β†’ {"code":"...hmscc code..."} β†’ 
{"success":true,"output":"...","errors":[]}

🧩 Language

Keywords

arena (main), speak (print), listen (input), let (var), loop, check (if)

Example

arena () {
  speak 42;
}

See HMSCC_TEST_CASES.md for more examples.


⚑ Commands

# Push to GitHub
git add . && git commit -m "msg" && git push origin main

# Frontend dev
cd frontend && npm run dev

# Backend
cd backend && npm start

# Docker test
docker build -t hmscc . && docker run -p 5001:5001 hmscc

πŸ”— Links

Link Purpose
https://github.com/HarshMrigank/HMSCC Repository
https://render.com/dashboard Deploy here
http://localhost:5174 Frontend local
http://localhost:5001 Backend local

βœ… Ready to Deploy?

  • Frontend works on localhost:5174
  • Backend works on localhost:5001
  • Health endpoint responds
  • All code committed
  • Ready to git push

πŸ‘‰ Follow the Quick Start at the top! πŸš€


Status: βœ… Production Ready | Deploy Time: ~15 minutes | Updated: Jan 30, 2026

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages