LOOM is a website where users can share their creative work safely, without AI webscraping. It aims to protect human-made art in an age where generative AI is rapidly flooding creative spaces.
- Node.js (v18+) - Download
- npm (comes with Node.js)
- MongoDB - Download Community Edition
- Git - Download
git clone https://github.com/EvuhLi/Loom.git
cd Loomnpm installcd backend
npm install
cd ..cd frontend
npm install
cd ..MongoDB:
- Go to MongoDB Atlas
- Sign up/login and create a new project
- Create a cluster (free tier available)
- Click "Connect" → "Drivers" → Copy connection string
- Replace username/password in the URI
- Use this as
MONGODB_URIinbackend/.env
reCAPTCHA:
- Go to Google reCAPTCHA Admin Console
- Click "+" to create a new site
- Enter your domain (e.g.,
localhostfor local development) - Choose reCAPTCHA v2 (I'm not a robot)
- Copy your Site Key →
VITE_RECAPTCHA_SITE_KEYinfrontend/.env - Copy your Secret Key →
RECAPTCHA_SECRET_KEYinbackend/.env
From logs, CLIP loads successfully. This test ensures the tagging endpoint functions correctly on macOS environments.
Open Terminal on a Mac and run:
cd ml-service
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main_ml:app --host 127.0.0.1 --port 8001If successful, the ML service will run locally at:
http://127.0.0.1:8001
Open Command Prompt or PowerShell and run:
cd ml-service
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn main_ml:app --host 127.0.0.1 --port 8001If successful, the ML service will run locally at:
http://127.0.0.1:8001
Note: On Windows, use python instead of python3, and the activation script is in .venv\Scripts\activate (not source).
Use curl to test the tagging API:
curl -F "image=@/path/to/test.jpg" http://127.0.0.1:8001/tagging/analyzeYou should receive JSON output similar to:
{
"subject": "...",
"style": "...",
"confidence": ...
}If it fails:
- Check Python version (
python3 --version) - Confirm virtual environment is activated
- Confirm port 8001 is not in use
Now test the full app flow.
cd backend
npm ci
npm run devUpload an image through the UI
This verifies:
To ensure tagging continues working on macOS, add a GitHub Actions matrix job.
Example:
runs-on: macos-latest
CI Steps:
- Boot ML service
- Run the same curl tagging test
- Assert JSON response
Create backend/.env:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/loom
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your_secure_password_here
RECAPTCHA_SECRET_KEY=your_recaptcha_secret_key_here
PORT=3001Create frontend/.env:
VITE_RECAPTCHA_SITE_KEY=your_recaptcha_site_key_here
VITE_BACKEND_URL=http://localhost:3001npm run devThis will start:
- Backend: http://localhost:3001
- Frontend: http://localhost:5174
- Open http://localhost:5174 in your browser
- Open loom-ejg3.onrender.com for the deployed website (closes if inactive)
- Sign up for a new account
- Try uploading art, searching users, and exploring the network feed
Loom/
├── backend/ # Node.js + Express server
│ ├── models/ # MongoDB schemas
│ ├── services/ # Business logic
│ ├── server.js # Main server file
│ └── package.json
├── frontend/ # React + Vite app
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── App.jsx # Main app layout
│ │ └── main.jsx # Entry point
│ ├── index.html # HTML template
│ └── package.json
└── ml-service/ # Python ML recommendations
- User Profiles: Create profiles, follow artists, customize bios
- Art Gallery: Upload and discover visual work
- FYP Feed: Personalized "For You Page" feed
- Network Visualization: Interactive D3.js network of connected artists
- Comments: Real-time comments on posts
- Search: Find users and explore the community
GET /api/posts- Get posts with paginationGET /api/posts/:id/full- Get post with commentsPOST /api/posts- Create new postPOST /api/posts/:id/like- Like a postPOST /api/posts/:id/comment- Add comment
POST /api/auth/register- Sign upPOST /api/auth/login- Log inGET /api/accounts/:username- Get user profileGET /api/search/users- Search users
GET /api/fyp- Get personalized feed
- Ensure MongoDB is running:
mongod - Check
MONGODB_URIinbackend/.env
- Verify
VITE_BACKEND_URLinfrontend/.env - Check backend is running on port 3001
- Kill process:
lsof -i :3001(thenkill -9 <PID>) - Or use different port in
.env
- Ensure
backend/yarn.lockis committed - Check all dependencies are in
package.json(not global)
- Frontend: React 19, Vite, React Router, D3.js
- Backend: Node.js, Express 5, MongoDB, Mongoose
- Deployment: Render.com
- Authentication: reCAPTCHA v2