The steps below contain everything a first time developer needs to get the Streamability project running locally.
- Docker Desktop
- Node
- Git
Node is the JavaScript runtime engine used on the Streamability project. The project is set up to run on the latest stable release which can be downloaded from this link. If you are using a different version you can try to run the project and in most cases it will run without issue. If you do have a problem, you can use a version manager like asdf or nvm to install a different version of Node.
You will need to install Docker on your machine to run the local Supabase server. Follow the installation instruction on the Docker website for your specific OS.
Git is the version control system used on the Streamability project. You can download the latest version from this link.
If you would prefer to follow the official GitHub documentation on forking, you can find them here. This is a slightly abridged version of those instructions.
-
Navigate to the develop branch of the repository on GitHub and click the "Fork" button on the top right corner of the page.
- Do not select "Copy the DEFAULT branch only" as you will need
develop
and the default branch ismain
.
- Do not select "Copy the DEFAULT branch only" as you will need
-
Click Create fork.
-
Navigate to the forked repository and click on the green "Code" button.
-
Copy the repository URL with the method of your choosing. We suggest SSH which can be setup by following these docs.
-
Go to your terminal program of choice and navigate the the folder you want the project to live in. Then run the command below to clone the repository:
git clone repository-url
-
In your terminal, navigate to the project directory with the command:
cd path-to-project
-
Once you are in the project directory you need to install node modules with the command:
npm install
-
To ensure git-hooks run during commits, you need to run the set up command:
npm run setup
You will need to fill out the .env
file with 3 variables. Use the .env.template
as a guide.
VITE_SUPABASE_URL
& VITE_SUPABASE_ANON_KEY
are for Supabase.
-
Ensure docker is running.
-
These keys will be output by the command:
npm run db-start
To have the keys automatically written to you .env file, use the command:
npm run db-start-env
Note: For remote develop or production keys, you will need to reach out to a codeowner. In general, these should not be needed.
VITE_MOVIEDB_KEY
comes from The Movie Database.
-
Navigate to https://www.themoviedb.org/ and create a free account.
-
Navigate to your profile settings and click on "API". There you will see your API key or a button to generate one.
You should now have everything set up and be able to run the application. If you have stopped the database since setting up environment variables, ensure docker is running and then run the command:
npm run db-start
To run the development server, use the command:
npm run dev
This will show a localhost URL in the terminal which is where the app is being served.
If you would like to see a deployed version of your work, push your branch to remote. Vercel will automatically deploy that branch in a test site.
To run the storybook application, use the command:
npm run storybook
The storybook application should automatically open in your web browser. Check out more detailed storybook documentation here.
If you run into issues with an npm install, use the command:
npm run clean
This will delete and reinstall all node_modules
as well as the npm cache.
If you see the error permission denied
when running one of the script files, use the command:
chmod +x ./scripts/file-name