You can find the development documentation on the website.
Check out the Postman docs, Swagger or Redoc.
For Cursor IDE users, check the docs.md file which contains documentation links that can be accessed using the @docs
symbol.
The documentation is divided into several sections:
- Run 4Geeks in Codespaces (no installation)
- Install Docker
- Run 4Geeks API as docker service
- Run 4Geeks in your local machine
- Run tests
Click Code
-> Codespaces
-> Create namespace on {BRANCH_NAME}
.
Install docker desktop in your Windows, else find a guide to install Docker and Docker Compose in your linux distribution uname -a
.
# open 4Geeks API as a service and export the port 8000
docker-compose up -d
# create super user
sudo docker compose run 4geeks python manage.py createsuperuser
# See the output of Django
docker-compose logs -f 4geeks
# open localhost:8000 to view the api
# open localhost:8000/admin to view the admin
# Check which dependencies you need install in your operating system
python -m scripts.doctor
# Setting up the redis and postgres database, you also can install manually in your local machine this databases
docker-compose up -d redis postgres
# Install and setting up your development environment (this command replace your .env file)
python -m scripts.install
You must up Redis and Postgres before open 4Geeks.
# Collect statics
pipenv run python manage.py collectstatic --noinput
# Run migrations
pipenv run python manage.py migrate
# Load fixtures (populate the database)
pipenv run python manage.py loaddata breathecode/*/fixtures/dev_*.json
# Create super user
pipenv run python manage.py createsuperuser
# Run server
pipenv run start
# open localhost:8000 to view the api
# open localhost:8000/admin to view the admin
# Check which dependencies you need install in your operating system
python -m scripts.doctor
# Install and setting up your development environment (this command replace your .env file)
python -m scripts.install
# Testing
pipenv run test ./breathecode/activity # path
# Testing in parallel
pipenv run ptest ./breathecode/activity # path
# Coverage
pipenv run cov breathecode.activity # python module path
# Coverage in parallel
pipenv run pcov breathecode.activity # python module path