https://tax-helper-frontend.vercel.app/
https://testdriven.io/blog/django-custom-user-model/
https://www.django-rest-framework.org/
https://docs.djangoproject.com/en/5.0/
Frontend: https://vercel.com/docs Backend: https://www.koyeb.com/docs/deploy/django Celery[redis]: https://www.koyeb.com/tutorials/deploy-a-python-celery-worker
git clone https://github.com/NoyanAziz/tax-helper.git
git status
You might be asked a username and password. For password you'll need to create an access token
Go to the tax-helper-frontend/ and run the following commands.
npm i
npm run build
npm run dev
- In the src/app/constants/routes.js change the BACKEND_BASE_ROUTE to
http://localhost:8000/
In case you are facing issues with npm i
upgrade your node version to 21. You can use nvm for having multiple node versions in your app for further info visit:
https://github.com/nvm-sh/nvm/blob/master/README.md
Once your frontend server has started, make sure to setup django. For that you will need to make a few changes to the code
- Go to the tax_helper/ directory in root
- Create a local db and set it up in the tax_helper/settings.py, follow this link https://www.w3schools.com/postgresql/postgresql_pgadmin4.php
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.getenv('DB_NAME'),
'USER': os.getenv('DB_USER'),
'PASSWORD': os.getenv('DB_PASSWORD'),
'HOST': os.getenv('DB_HOST'),
'PORT': os.getenv('DB_PORT'),
}
}
- Comment out
DATABASES = {
'default': dj_database_url.config(
conn_max_age=600,
conn_health_checks=True,
),
}
- Add a .env of the format and add your keys
SECRET_KEY='your-secret-key'
DEBUG=True
DB_NAME='your-db-name'
DB_USER='your-db-user'
DB_PASSWORD='your-db-pass'
DB_HOST='localhost'
DB_PORT='5432'
GROQ_API_KEY='your-groq-api'
DB_URL=''
- run
pip install -r requirements.txt
to install packages - run
python manage.py migrate
to migrate database - run
python manage.py createsuperuser
to create your super user - run
python manage.py runserver
to start the server
- Install redis to your machine using https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/
- In the tax_helper/settings.py update CELERY_BROKER_URL and CELERY_RESULT_BACKEND to
redis://localhost:6379/0
- Run
celery -A tax_helper worker -l info
Go to https://console.groq.com/keys and get your api key and add it into your .env file
---- Now the setup is completed for you to run on your local machine ----