Table of Contents
- Preface
- Prerequisites
- Python Requirements
- Node Requirements
- To build locally (Manual)
- For Production
- Contributing
- License
This is the repository for the website of Kakusui LLC (kakusui.org). All code is open-source and available for anyone to use. Below is a brief overview of the project, how to build it locally, information regarding production, licensing, and contributing.
If you need to report a security vulnerability, please see the SECURITY.md file.
python (runs on 3.11.8, lowest tested version is 3.11.4)
node 20.13.1
npm 10.8.0
ja-core-news-lg==3.7.0 (this is not a pip package, it is a spacy model) Must be installed via spacy. (Done in setup.py)
fastapi==0.110.3
kairyou==1.6.5
uvicorn==0.30.0
easytl==0.4.9
aiofiles==23.2.1
httpx==0.25.1
elucidate==0.0.2
passlib==1.7.4
pyotp==2.9.0
bcrypt==3.1.7
sqlalchemy==2.0.31
python-gnupg==0.5.2
apscheduler==3.10.4
pyjwt==2.8.0
python-multipart==0.0.9
werkzeug==3.0.4
stripe==10.12.0
See frontend/package.json
for a list of node requirements.
Tip
This may not work on linux, if you are using linux, we reccomend using the docker method below.
- Clone the repo, make sure you are using the correct branch (currently
production
) - Navigate to the
backend
directory.cd backend
. Inside is the python backend. - Run the setup script with the local argument. This will install all requirements and setup the local env
python setup.py local
. - Run the server. For local
uvicorn main:app --reload --port 5000
- Open a new terminal and navigate to the
frontend
directory.cd frontend
. Inside is the react (vite) frontend. - First install all required packages, these are in
package.json
. Donpm i
. Then run the dev server withnpm run dev
- Website will be on localhost:5173 (frontend) and localhost:5000 (backend)
- Clone the repo, make sure you are using the correct branch (currently
production
)
cd backend
docker build -t kakusui-org-backend -f Dockerfile.dev .
docker run -p 5000:5000 kakusui-org-backend
cd frontend
docker build -t kakusui-org-frontend -f Dockerfile .
docker run -p 5173:5173 kakusui-org-frontend
Tip
We are using docker compose v2 so docker compose up --build
is the command we use, adjust as needed if you are using an older version of docker compose.
Run docker compose up --build
from the root directory.
Frontend is hosted on cloudflare pages. To deploy, push to the production
branch. Development branch is for development only, intermediate builds deploy every commit.
For production, the backend is hosted on fly.io via a dockerfile.
- Make sure you have the fly cli installed and are logged in.
- Run
fly deploy
in the backend directorycd backend
. This will build the dockerfile and deploy it to fly.io.
If you would like to contribute, please open an issue or a pull request. No specific guidelines, but remain professional.
As Kakusui is an avid supporter of open-source software, this project is licensed under one of the strongest copyleft licenses available, the GNU Affero General Public License (AGPLv3).
You can find the full text of the license in the LICENSE file.
The AGPLv3 is a copyleft license that promotes the principles of open-source software. It ensures that any derivative works based on this project, as well as any software that interacts with users over a network, must also be distributed under the same AGPLv3 license. This license grants you the freedom to use, modify, and distribute the software.
Please note that this information is a brief summary of the AGPLv3. For a detailed understanding of your rights and obligations under this license, please refer to the full license text.