Grit One Installation¶
This document will get you up and running with Grit One.
Requirements¶
- Python 3.11+
- MacOS 15.6+ or Linux
How to install Grit¶
Install dependencies¶
Before running the application, make sure to install the necessary dependencies. Follow these steps:
- Open a terminal or command prompt.
- Navigate to the project directory.
- Assuming that you have a supported version of Python installed, you can first set up your environment with:
Note: If
command not found: python3.11, usebrew install python@3.11 - 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