This is the Equanix website project, built with React and modern UI components.
After cloning the repository, run the following from the project root to install dependencies and start both frontend and backend in development:
npm install
npm startWhat this does:
npm installwill install root dependencies and run apostinstallstep that installs backend dependencies.npm startruns a single command which starts both the backend (nodemon) and the CRA frontend concurrently.
- Add server secrets to
backend/.env(this file is ignored by git). Example fields you will typically set:
PORT=5001
MONGODB_URI=mongodb://localhost:27017/equanix_trading
JWT_SECRET=your_jwt_secret
JWT_REFRESH_SECRET=your_jwt_refresh_secret
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
CLIENT_URL=http://localhost:3000
- For frontend Supabase integration, add
REACT_APP_SUPABASE_URLandREACT_APP_SUPABASE_ANON_KEYto a.env.localin the repo root.
We've added backend/.env.example and a small helper scripts/setup-dev.ps1 to make on-boarding easier. From the project root run:
.\scripts\setup-dev.ps1This will copy backend/.env.example to backend/.env and open it in Notepad so your coworker can paste real API keys locally. Do NOT commit backend/.env.
Security note: never commit service role keys or other secrets to GitHub. The repository's .gitignore already ignores backend/.env and other env files.
To get started with development, follow these steps:
- Start the backend:
cd backend && npm install && npm run dev - Start the frontend:
npm install && npm start
The app includes multiple auth options. The easiest, most reliable way to allow users to sign in with email/password from any device is to use Supabase Auth (hosted). The frontend already contains Supabase integration and will prefer Supabase when the environment variables below are set.
- Create a free Supabase project at https://app.supabase.com
- In your Supabase project settings, copy the Project URL and the anon/public API key.
- In your frontend project, create a
.env.localfile with:
REACT_APP_SUPABASE_URL=https://your-project-ref.supabase.co
REACT_APP_SUPABASE_ANON_KEY=your-anon-key
REACT_APP_API_URL=http://localhost:5001/api # optional: keeps existing backend API
- Start the frontend (
npm start). The Auth UI in the app will now use Supabase for sign-up, sign-in, and sign-out. Sessions persisted by Supabase will work across devices and browsers.
Notes and fallbacks:
- If Supabase env vars are not set, the app falls back to the backend API (
/api/auth) and, if that isn't available, to a local in-browser store (for demos). - The backend also supports MongoDB + JWT (see
backend/); if you prefer keeping auth on your own server, configureMONGODB_URIand the JWT env vars and switch routes inbackend/server.jsfrom the mock auth to the real auth router. - Supabase handles email verification, password resets, and secure session management for you, which reduces implementation and maintenance burden.
Testing across devices:
- Sign up with an email and password in one browser/device. Supabase will persist the session.
- Close the browser, open the same site on another device, and the user can sign in there with the same credentials. If you've enabled email confirmations in Supabase, ensure the user confirms their email if required by your Supabase settings.
If you'd like, I can also wire the backend to validate Supabase JWTs on protected routes or fully migrate auth to Supabase on the backend — tell me which you'd prefer and I will implement it.
This is the Equanix website project, built with React and modern UI components.
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify