Use this guide to setup the backend for this project.
It uses Supabase, Drizzle ORM, and Server Actions.
Write the complete code for every step. Do not get lazy. Write everything that is needed.
Your goal is to completely finish the backend setup.
| ZYTE_API_KEY= |
| # Windsurf Memory Bank | |
| I am Windsurf, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional. | |
| ## Memory Bank Structure | |
| The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy: | |
| ```mermaid | |
| flowchart TD |
| <tutor_mode_instructions> | |
| You are a friendly computer science tutor, and I am the student. Your role is to guide me through learning step by step. | |
| - **Assess my knowledge** | |
| - First, ask me my name and what I want to learn. Determine where to start based on my experience. Also ask me if there's anything I'm interested in that you can incorporate into the lessons (i.e. shows, hobbies, interests, etc). | |
| - Ask me these questions one a a time. | |
| - **Teach using code** | |
| - Teach me concepts in the chat window, and create files as "lessons" when you need to demonstrate something. Use the naming format 001-lesson-[lesson-slug], like 001-lesson-about-file.py, or whatever the equivalent is in the language I'm learning. Start with a 0-padded 3 digit number. | |
| - Write code and explain how to run it. When you are teaching me, do not run any commands for me. Just tell me what to run, and once you've taught me how to run something, encourage me to run commands myself. In the beginning, encourage me to share what I sa |
| #!/usr/bin/env bash | |
| # Small shell script to more easily automatically download and transcribe live stream VODs. | |
| # This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp | |
| # Use `./transcribe-vod help` to print help info. | |
| # MIT License | |
| # Copyright (c) 2022 Daniils Petrovs |
| // Website you intended to retrieve for users. | |
| const upstream = 'api.openai.com' | |
| // Custom pathname for the upstream website. | |
| const upstream_path = '/' | |
| // Website you intended to retrieve for users using mobile devices. | |
| const upstream_mobile = upstream | |
| // Countries and regions where you wish to suspend your service. |
| import re | |
| from typing import List | |
| import spacy | |
| from spacy.tokens import Doc | |
| from tqdm import tqdm | |
| class SpacyPreprocessor: | |
| def __init__( |
| #!/usr/bin/python | |
| import os | |
| import errno | |
| import sqlite3 | |
| import sys | |
| from time import time | |
| from cPickle import loads, dumps | |
| import logging |
# run the following command in PowerShell
$ wsl --install -d Ubuntu-18.04
# Ubuntu-18.04 is my preferred Linux distribution. You can find all the supported distributions by running
# wsl --list --online
| import base64, requests | |
| # API RELATED TO IP ADDRESS | |
| ip_category_api = "https://api.xforce.ibmcloud.com/ipr" | |
| ip_report_api = "https://api.xforce.ibmcloud.com/ipr/{ip}" | |
| ip_reputation_api = "https://api.xforce.ibmcloud.com/ipr/history/{ip}" | |
| ip_malware_api = "https://api.xforce.ibmcloud.com/ipr/malware/{ip}" | |
| # API RELATED TO URL AND DOMAIN | |
| url_category_api = "https://api.xforce.ibmcloud.com/url" |