Skip to content

QuantumLogicsLabs/DigitalLogicsStudio-Backend

DigitalLogicsStudio Backend

Express and MongoDB backend for Boolforge / Digital Logics Studio. It provides health checks and JWT-based authentication endpoints for the frontend application.

Tech Stack

  • Node.js
  • Express
  • MongoDB Atlas
  • Mongoose
  • JWT
  • bcryptjs

Project Structure

DigitalLogicsStudio-Backend/
├── src/
│   ├── config/
│   ├── controllers/
│   ├── middleware/
│   ├── models/
│   ├── routes/
│   ├── utils/
│   └── app.js
├── .env.example
├── server.js
├── package.json
└── README.md

Environment

Create a local .env file from .env.example.

PORT=5000
NODE_ENV=development
CLIENT_URL=http://localhost:3000
MONGO_URI=your-mongodb-connection-string
JWT_SECRET=replace-with-a-long-random-secret
JWT_EXPIRES_IN=7d
COOKIE_EXPIRES_DAYS=7

Install and Run

Install dependencies:

npm install

Run in development:

npm run dev

Run in production mode:

npm start

Available API Routes

  • GET / - backend status message
  • GET /api/health - basic health check
  • POST /api/auth/register - create account
  • POST /api/auth/login - log in
  • POST /api/auth/logout - clear auth cookie
  • GET /api/auth/me - fetch current logged-in user

Authentication Notes

  • Passwords are hashed with bcryptjs
  • JWTs are issued by the backend
  • Tokens are stored in an HTTP-only cookie
  • CORS is configured to allow requests from CLIENT_URL

Notes

  • .env files are ignored; .env.example remains tracked
  • package-lock.json is tracked and should stay committed

About

Powering Digital Logics Studio with scalable APIs, simulation engines, and intelligent computation at the core

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors