Clayton-TV / claytontv

3 stars 2 forks source link

The official website for Clayton TV

image

*This is a demo site, soon to undergo substantial changes! Join our hackathon!

Getting Started

To get started, you'll need to install a few things. All the tech used is cross-platform, but there will still be a few differences for macOS, Windows and Linux users.

Please follow the instructions carefully, and raise an issue for anything that doesn't work!

Prerequisites

One of the following code editors (aka an Integrated Development Environment, or IDE)

GitHub Desktop (A nice UI for git, the version management software. It will install git for you if you don't already have it.)

Python (the programming language that our Django app uses)

Node.js (for the front-end design of our app)

Install instructions

Clone the repo in Github Desktop, or run the following command in a terminal window (Note: you may need to use a Command Prompt on Windows, as a git shell or PowerShell may not work).

git clone git@github.com:Clayton-TV/claytontv

Open the project in your editor, or change directory into the project

cd claytontv

Set up python environment

# Install pipenv
python3.12 -m pip install pipenv

#Above command may fail in MacOS (x86_64 Intel chip) - instead this works, then continue as before.
brew install pipenv

# Start pipenv
pipenv shell

Install python dependencies

pipenv install

Install the node dependencies

npm install

Run the migrations

python manage.py migrate

Launch the app

# Run the python server (backend)
python manage.py runserver

Open a new terminal window, using the virtual environment as before, and run:

# Run the vite server (frontend)
npm run dev

Go to http://localhost:8000 and you should see the image at the top of this README file.

Troubleshooting

  1. npm install error - Check you're in the right place - "cd" or do from VSCode
  2. python not found - check environment variables - add python to the path and restart
  3. commands need "pipenv run" prefix

Useful Tips

  1. On windows you can open cmd at a specific folder by navigating there and typing CMD in the location bar of the explorer window.

Contributing

To report a bug, please raise an issue. Include steps to replicate and a screenshot of the error.

To suggest a feature, please raise an issue. Add a brief summary of the changes and any additional details.

To commit changes, please create a branch in the pattern of bug/title-of-bug or feature/title-of-feature.

Licence