Coder Social home page Coder Social logo

adamuhh / loflo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 688 KB

LoFlo, a simple flashcard app. Create, study, and reinforce your knowledge.

Home Page: https://loflo.vercel.app

TypeScript 99.00% JavaScript 0.10% CSS 0.90%
drizzle-orm next-auth nextjs turso typescript tailwindcss

loflo's Introduction

Loflo

Welcome to Loflo, a simple flashcard app for effective learning.

Features

  • Create folders, sub-folders, and flashcards.
  • Search, bookmark, and filter flashcards.
  • Dedicated practice mode.
  • Text-to-Speech.

The App

Practice mode

Editing, filtering, and sub-folders

Development

Install

pnpm i

Run development

pnpm dev

NextAuth

  • For github credentials, remember that it should be an OAuth App, not the Github App

Turso DB

My steps to install Turso CLI on Windows

  • 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 run wget 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 using sudo mv sqld /usr/local/bin/
  • Open ~/.bashrc using vim ~/.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 paste export PATH="/usr/local/bin/sqld:$PATH"
    • Then, press Escape on your keyboard, type :w and press ENTER
    • Then type :x, and press ENTER
    • Type source ~/.bashrc in the terminal (to refresh paths)
  • 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

Run db locally

turso dev --db-file dev.db

Push db

pnpm db:push

Drizzle Studio

pnpm studio

Production

  • 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 your DATABASE_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

IMPORTANT

  • 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

Known Issues

  • Count for nested subfolders and flashcards are not accurate.

loflo's People

Contributors

adamuhh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.