Welcome to Loflo, a simple flashcard app for effective learning.
- Create folders, sub-folders, and flashcards.
- Search, bookmark, and filter flashcards.
- Dedicated practice mode.
- Text-to-Speech.
pnpm i
pnpm dev
- For github credentials, remember that it should be an OAuth App, not the Github App
- Requirements to run: Turso CLI
- Download WSL
- Download Homebrew (if not installed)
- Follow cli steps to ensure it's added to your PATH
- Run
sudo apt-get update
- Ensure Build tools are installed:
sudo apt-get install build-essential procps curl file git
- Ensure gcc is installed
brew install gcc
- Install Turso CLI using the following command (at the time of writing this):
brew install tursodatabase/tap/turso
- Go to the Releases Page and copy the link to the latest linux file, example:
sqld-x86_64-unknown-linux-gnu.tar.xz
- Open WSL terminal (not cmd, has to be WSL), type
cd
to go to root, and runwget LATEST_LINK__HERE
, ex:wget https://github.com/libsql/sqld/releases/download/v0.21.9/sqld-x86_64-unknown-linux-gnu.tar.xz
- Unzip the tar file using
tar -xf FILE_NAME
, ex:tar -xf sqld-x86_64-unknown-linux-gnu.tar.xz
- Type
ls
to view the name of the extracted folder cd
into the folder, ex:sqld-x86_64-unknown-linux-gnu/
- Move
sqld
into a system-wide directory usingsudo mv sqld /usr/local/bin/
- Open
~/.bashrc
usingvim ~/.bashrc
or an editor of your choice (eg:nano
)- Use your arrow key to go all the way down to a new line, press the
Insert
key on your keyboard, and pasteexport PATH="/usr/local/bin/sqld:$PATH"
- Then, press
Escape
on your keyboard, type:w
and pressENTER
- Then type
:x
, and pressENTER
- Type
source ~/.bashrc
in the terminal (to refresh paths)
- Use your arrow key to go all the way down to a new line, press the
- Verify sqld works by typing
sqld --version
- Then run locally, using the Turso command below
Also, if you accidentally typed exit
on the WSL terminal, and it lost color, packages, and functionality, type source ~/.bashrc
turso dev --db-file dev.db
pnpm db:push
pnpm studio
- First, login - you may need to add
--headless
at the end - if you do need
--headless
, just sign in and paste the secret export to your cli
turso auth login
- Then, create your database name
turso db create DBNAME
- Then, show your newly create db's info
- It will show a URL, put that in your
.env.local
as yourDATABASE_URL
turso db show DBNAME
- Then, create a secret token for your db
- Use that as your
DATABASE_AUTH_TOKEN
-e none
is to not expire
turso db tokens create DBNAME -e none
- Upload app to vercel with these environment variables, and you're done :P
vercel --prod
- Make sure that you push your schema to the product turso db
- In other words, run
pnpm db:push
in your CLI with your turso env instead of dev env
- Count for nested subfolders and flashcards are not accurate.