RubikLog is a Django-based web application for tracking Rubik’s Cube solving times. It features a ReactJS frontend styled with TailwindCSS and uses PostgreSQL as its database.
- Frontend: Built with ReactJS and styled using TailwindCSS.
- Backend: Powered by Django, featuring RESTful APIs.
- Database: PostgreSQL for secure and efficient data storage.
- Tracking: Log solving times and scrambles for practice and analysis.
- Continuous Integration: GitHub Actions workflow for CI/CD pipelines.
.
├── .gitignore
├── LICENSE
├── README.md
├── RubikLog
│ ├── .env
│ ├── RubikLog
│ │ ├── __init__.py
│ │ ├── asgi.py
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── frontend
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── public
│ │ │ ├── favicon.ico
│ │ │ ├── index.html
│ │ │ ├── logo192.png
│ │ │ ├── logo512.png
│ │ │ ├── manifest.json
│ │ │ └── robots.txt
│ │ ├── src
│ │ │ ├── App.css
│ │ │ ├── App.js
│ │ │ ├── App.test.js
│ │ │ ├── index.css
│ │ │ ├── index.js
│ │ │ ├── logo.svg
│ │ │ ├── reportWebVitals.js
│ │ │ └── setupTests.js
│ │ └── tailwind.config.js
│ ├── manage.py
│ └── tracker
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── migrations
│ │ ├── 0001_initial.py
│ │ ├── 0002_solve_scramble.py
│ │ └── __init__.py
│ ├── models.py
│ ├── serializers.py
│ ├── tests.py
│ ├── urls.py
│ └── views.py
└── requirements.txt
- Python 3.10+
- Node.js 18+
- PostgreSQL 14+
- npm (Node Package Manager)
Install Python dependencies from the requirements.txt
file:
pip install -r requirements.txt
Install Node.js dependencies for the frontend:
cd RubikLog/frontend
npm install
Create a .env
file in the RubikLog
directory with the following content:
SECRET_KEY=<your_django_secret_key>
DEBUG=True
DATABASE_URL=postgres://<db_user>:<db_password>@localhost:5432/rubiklogdb
git clone https://github.com/shreyuu/RubikLog.git
cd RubikLog
python -m venv rubiklogenv
source rubiklogenv/bin/activate
pip install -r requirements.txt
Ensure PostgreSQL is running, then create the database:
psql -U postgres -c "CREATE DATABASE rubiklogdb;"
python manage.py migrate
python manage.py runserver
cd frontend
npm install
npm start
Run the Django tests using:
python manage.py test
Run React tests using:
npm test -- --watchAll=false
A GitHub Actions workflow is set up for the following:
- Running backend tests using Django.
- Running frontend tests and builds using ReactJS.
The workflow file is located at .github/workflows/ci.yml
.
To deploy the app:
-
Ensure PostgreSQL is configured and accessible.
-
Set the
DEBUG
environment variable toFalse
. -
Collect static files for production:
python manage.py collectstatic
-
Use a production-grade web server like Gunicorn or deploy using platforms such as Heroku, AWS, or Docker.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please create a pull request or open an issue for any enhancements or bug fixes.
- Django for the backend framework.
- ReactJS for the frontend framework.
- TailwindCSS for styling.
- PostgreSQL for the database.
For any inquiries or issues, please reach out to Shreyuu.