Please visit https://thebrainrot.fun
This project is maintained only by me. If you're enjoying it and would like to support my work, please consider supporting me here. Your contributions are greatly appreciated! 馃檹
Ensure the following are installed:
-
Python 3.8 or higher
- macOS:
brew install python3 - Fedora:
sudo dnf install python3 python3-pip - Ubuntu:
sudo apt install python3 python3-pip
- macOS:
-
Node.js and npm
- macOS:
brew install node - Fedora:
sudo dnf install nodejs npm - Ubuntu:
sudo apt install nodejs npm
- macOS:
-
Redis
- macOS:
brew install redis - Fedora:
sudo dnf install redis - Ubuntu:
sudo apt install redis
Start Redis:
- macOS:
brew services start redis - Fedora:
sudo systemctl start redis - Ubuntu:
sudo systemctl start redis
- macOS:
-
Clone the repository:
git clone https://github.com/atakanakin/BrainRot.git cd BrainRot -
Setup the backend environment:
cd backend python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Navigate to the
frontendfolder:cd frontend -
Setup the frontend environment:
npm install
Ensure Redis is installed and running:
- macOS:
brew services start redis - Fedora:
sudo systemctl start redis - Ubuntu:
sudo systemctl start redis
Run the React frontend:
cd frontend
npm startThe frontend will be available at http://localhost:3000.
Run the Celery worker and Flask backend in separate terminals:
cd backend
source venv/bin/activate
celery -A app.celery worker --loglevel=infocd backend
source venv/bin/activate
python3 app.pyThe backend will be available at http://localhost:5000.
-
Separate Processes:
- The
celeryworker andpython app.pyneed to be run in different terminals because both are blocking processes.
- The
-
Ensure Redis is Running:
- If Redis is not running, tasks queued by Celery will not be processed.
-
Default Ports:
- Frontend:
http://localhost:3000 - Backend:
http://localhost:5000
- Frontend:
-
If You Face Node.js Issues:
- Use the following command before running
npm start:export NODE_OPTIONS=--openssl-legacy-provider
- Use the following command before running