The frontend for Codex, written in React with Material UI components.
Found a bug? Submit a report here.
Developer contributions are very much appreciated. Refer to the contribution guide or reach out to us on the Wild Me discord.
To install a working codex-frontend dev environment, you'll need install the backend by following the instructions in the Houston.
Instructions assume that you are signed into your GitHub account, have admin access to your OS's terminal, and have Git, Docker, and docker-compose installed. Instructions are written for linux with limited support for other OSs.
git clone https://github.com/USERNAME/codex-frontend
cd codex-frontend
git remote add upstream https://github.com/WildMeOrg/codex-frontend
git fetch upstream
npm install husky -D
npm run prepare
houston
project, edit the docker-compose.codex.yml
file to redirect to your local copy of the dev-frontend code.
dev-frontend:
and navigate to volumes:
- ../../_frontend:/code
- LOCATION/codex-frontend:/code
where LOCATION is the relative path to your local copy.cd
to your local houston
copy and run the following commands, noting that the docker-compose steps may take a long time to run the first time:
./scripts/codex/activate.sh
./scripts/codex/build.frontend.sh
docker-compose pull
docker-compose build
docker-compose up -d
https://localhost:84
. If you see a welcome screen with Codex Initialized, you're ready to get started!
docker-compose down
to bring down the instance.sudo sysctl -w vm.max_map_count=262144
. This will need to be done each time you restart your system. Instead, add vm.max_map_count = 262144
to your system file /etc/sysctl.conf
docker-compose up
again.git checkout main
git branch ISSUENUMBER-FEATUREBRANCHNAME
git checkout ISSUENUMBER-FEATUREBRANCHNAME
git pull upstream
As you make the code changes necessary for the issue you're working on, you may find the following git commands useful.
git log
: latest commits of current branchgit status
: current staged and unstaged modificationsgit diff --staged
: the differences between the staging area and the last commitgit add <file name>
: add files that have changes to staging in preparation for commitgit commit
: commits the staged files, opens a text editor for you to write a commit logThe following commands are helpful when developing in this manner:
docker-compose up -d
: Run all containers in daemon mode, so you don't see all the logs running together.docker-compose restart <image>
: Restart a particular docker image (remember these are listed in docker-compose.yml
).docker-compose logs -f <image>
: Show logs for a particular image.docker-compose down
: Stop all images.A build can be initiated with the command npm run build
. You can specify the URL for Houston in /config/config.json
or as a command line argument. Here are some examples:
npm run build -- --env=houston=https://houston.dyn.wildme.io
npm run build -- --env=houston=http://localhost:9999
npm run build -- --env=houston=relative // use relative file paths for API requests
Up to this point, all changes have been done to your local copy of codex-frontend. You need to push the new commits to a remote branch to start the PR process. Note: Now is the time to clean up your PR if you choose to squash commits. If you're looking for more information on these practices, see this pull request tutorial.
git push <remote> ISSUENUMBER-FEATUREBRANCHNAME
If you want to push upstream directly, use git push origin ISSUENUMBER-FEATUREBRANCHNAME
At this point, it's on us to get you feedback on your submission. Someone from the Wild ME team will review the project and provide any feedback that may be necessary. If changes are recommended, you'll need to checkout the branch you're working from, update the branch, and make these changes locally.
git checkout ISSUENUMBER-FEATUREBRANCHNAME
git pull upstream main
git add <filename>
for all files impacted by changesgit commit