A concise reference for the DEX_Nova_MVP repository. This project pairs a Node.js/Express backend with a React frontend and includes Solidity contract sources.
Repository contents
src/— backend (Express, controllers, models)client/— React frontend (CRA)contract/,migrations/— Solidity contracts and migration scriptspublic/,data/,models/,routes/,middlewares/— server assets and helpers
Quick start
- Install dependencies (root + client):
npm install
npm install --prefix client-
Create a
.envat the project root (see Environment section below). -
Run development servers (backend + frontend):
npm run devUseful npm scripts
npm run server— start backend withnodemonnpm run client— start React dev server (runsclient/npm start)npm run dev— run backend and client concurrentlynpm start— start production server (expects built frontend and configured env)
Environment variables
The backend uses several process.env keys. Common values to set in .env:
PORT(default4000)NODE_ENV(development/production)MONGO_URI(MongoDB connection string)JWT_SECRET,JWT_EXPIRE,COOKIE_EXPIRES_TIMESENDGRID_API_KEY,SENDGRID_MAIL,SENDGRID_RESET_TEMPLATEID,SENDGRID_ORDER_TEMPLATEIDCLOUDINARY_NAME,CLOUDINARY_API_KEY,CLOUDINARY_API_SECRET- Pay providers:
STRIPE_SECRET_KEY,PAYTM_MID,PAYTM_MERCHANT_KEY, etc. CLIENT_URL— frontend origin used for CORS and email links
An example .env was added to the README earlier; I can also generate a full .env.example file containing every process.env key scanned from src/.
Client notes
- The React frontend lives in
client/. Seeclient/README.mdandclient/.env.examplefor frontend-specific setup. The client uses aproxyto forward API requests tohttp://localhost:4000in development.
Contracts
- Solidity sources are in
contract/. Use Truffle or Hardhat to compile and deploy. Migrations are inmigrations/.
Contributing
- Fork, branch, and open a pull request with a clear description.
- Run tests and linters before submitting changes.
License
This project is licensed under the MIT License — see LICENSE.
If you'd like, I can now generate a complete top-level .env.example by scanning src/ for process.env usages and creating a file with placeholder values.
DEX_Nova_MVP is a minimal viable product that demonstrates a full-stack DEX/marketplace flow combining a REST API backend, a React frontend, and Solidity smart contract artifacts. It is intended as a starting point for prototyping token-enabled marketplaces and simple trading flows.
Key capabilities included in this repo:
- Product catalog and images (backend models +
data/products.jsonsample data) - Shopping cart, save-for-later, and order flows (backend controllers + frontend views)
- User authentication and authorization using JWTs
- Email notifications (SendGrid) and SMTP fallback
- File uploads with Cloudinary integration
- Payment integration scaffolding (Stripe and Paytm placeholders)
- Solidity contracts and migrations in
contract/for on-chain features
- Backend (server): Node.js + Express. Routes are defined under
src/routes, business logic insrc/controllers, and data models insrc/models(Mongoose). The server is stateless and uses JWTs for authentication. - Database: MongoDB via Mongoose. Connection code lives in
src/config/database.jsand helper connection utilities undersrc/middlewares/helpers. - Frontend (client): React (Create React App) with Redux for state management and
redux-thunkfor async actions. UI uses MUI and Tailwind where applicable. The client proxies API requests to the server in development (client/package.jsonproxy). - Smart contracts: Solidity sources in
contract/, migrations inmigrations/. Contracts are not automatically deployed by the app — use Truffle/Hardhat to compile and deploy. - Third-party integrations: SendGrid (
@sendgrid/mail) for transactional emails, Cloudinary for media storage, Stripe/Paytm SDKs for payments (example hooks present in controllers), and optional analytics keys in the frontend.
- Runtime: Node.js 14+
- Server framework: Express
- Database: MongoDB (Mongoose ODM)
- Authentication: JSON Web Tokens (JWT)
- Frontend: React (Create React App), Redux, react-router-dom
- UI: Material UI (MUI), Tailwind CSS
- Payments: Stripe (example) and Paytm integration scaffolding
- Email: SendGrid (primary), SMTP fallbacks
- File uploads: express-fileupload + Cloudinary
- Contracts: Solidity (pragma), migration scripts for deployment
- Install dependencies:
npm install
npm install --prefix client- Create
.envwith the variables listed earlier and start development:
npm run dev- Frontend runs on port
3006(development) and proxies API requests to the backend athttp://localhost:4000.
- API entry:
src/server.jsandsrc/app.js - DB config:
src/config/database.js - Auth utilities:
src/utils/jwtToken.js,src/middlewares/user_actions/auth.js - Controllers:
src/controllers/*(products, orders, users, payments) - Models:
src/models/*(Product, User, Order, Cart, etc.) - Frontend entry:
client/src/index.jsandclient/src/App.js - Contracts:
contract/andmigrations/
- Tests: frontend tests use CRA test tooling; backend tests are not included — I can scaffold Jest + supertest if you want.
- CI/CD: no pipeline configured. I can add a GitHub Actions workflow to build and test both server and client.
- Deployment: the
Procfilesuggests Heroku-style deployment; alternatively build the client and serve statically from the Express server.
If you'd like, I will mark this task complete and can also generate a top-level .env.example containing every process.env key found in src/.