Grit One Quickstart¶
This document will get you up and running with Grit One.
Prerequisites¶
- Python 3.13+
- MacOS 15.6+ or Linux
- A Grit account. This app is provisioned for your organization as part of a Grit enterprise engagement. Self-registration is not available; if you do not have an account, please contact your account manager or contact us to set one up.
- Grit One SDK binaries that need to be installed on top of the git repo. These are provided by Grit once you have an account.
Getting Started¶
Installation¶
Before running the application, make sure to install the necessary dependencies. Follow these steps:
- Open a terminal or command prompt. Clone the project from Github:
- Add the Grit One SDK binaries on top of the cloned repo by running the installation script provided with your Grit account. You will receive this script after you open a Grit account.
- Assuming that you have a supported version of Python installed, you can first set up your environment with:
Note: If
command not found: python3.13, usebrew install python@3.13 - Install the backend dependencies using pip:
This command will install all the Python packages listed in the
requirements.txtfile. - Perform necessary installation. This is to install Tailwind CSS.
- For local development, add this in
BASE_DIR/credentials.json: - Go to aws.amazon.com -> RDS -> DB Instances -> database instance. Copy this endpoint.
Update 'HOST' in
DATABASESin settings.py to use this value. - Edit security group for the RDS.
- In aws.amazon.com, RDS, click on database-1-instance-1 -> connectivity & security -> EC2 Security Group - inbound -> Edit inbound rules.
- Remove the default rule, then add
Type: PostgreSQL, Source: Anywhere-IPv4, then save rules. - Note that this is for development only. Change this setting in production.
- In aws.amazon.com, go to S3, then create (if it doesn't exist yet) a bucket for your chatbot vectorstores (assets).
- In IAM, create a new user (if it doesn't exist yet) to access the S3 bucket. Then, add in credentials.json:
- Run
python manage.py migrateto apply database migrations for the first time. - Create a new super admin. Run
python manage.py createsuperuser, input email and password.
Run Local Development¶
- Activate environment
- Run server locally
Test Authentication¶
To test authentication run the following:
curl -X POST -d "username=your_username&password=your_password" http://localhost:8000/auth/login/ -c cookies.txt
Set Up Database¶
- Perform schema check
- Perform make migrations
- Apply migrations
Deployment To Production¶
See Deployment