Keepit is a CRUD application designed for language learners who want to improve their vocabulary. With Keepit, users can save words along with their translations to their mother language, making it easy to review and remember new vocabulary. The application also includes a flashcards page where users can test their memory and retention of the words they've saved.
Keepit has been my go-to project for testing out different technologies. I have already implemented it using tech stacks such as:
This time I wanted to try Vite, Netlify Functions, Prisma ORM and PlanetScale to build and maintain the application.
Edit: PlanetScale made the decision to remove the Hobby Tier (more info here), and I decided to migrate my data to SQLite (branch -> sqlite).
- yarn:
npm install yarn -g
- Netlify CLI:
npm install netlify-cli -g
-
Clone the repo:
git clone https://github.com/athanasu/keepit-vite.git
-
Move into the folder:
cd ./keepit-vite
-
Install packages:
yarn
-
Create the .env file:
cp .env-example .env
-
Create a PlanetScale account and create the
Keepit_Translation
table:CREATE TABLE `Keepit_Translation` ( `id` int NOT NULL AUTO_INCREMENT, `createdAt` datetime(3) NOT NULL DEFAULT current_timestamp(3), `updatedAt` datetime(3) NOT NULL, `from` varchar(255) NOT NULL, `to` varchar(255) NOT NULL, `notes` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE InnoDB, CHARSET utf8mb4, COLLATE utf8mb4_unicode_ci;
-
Update the
.env
file with theDATABASE_URL
credentialsNODE_ENV
of your preference or set theVITE_RUN_MSW
to true to run the mock server. -
Run the app:
netlify dev
You can run the application in 2 modes by setting the VITE_RUN_MSW
value in the .env
file:
VITE_RUN_MSW={any}
: Run the local server which connects to theDATABASE_URL
you specifiedVITE_RUN_MSW="true"
: Run the mock server. Even if you haven't completed the PlanetScale setup, themsw
mode will run the application with mocked data
I used Netlify CLI to build and deploy the example app. Steps I followed:
ntl sites:list
ntl link
ntl env:set VITE_RUN_MSW "true"
ntl deploy --prod
An example of the application in msw
mode can be found here.
- Supabase integration for authentication
Distributed under the MIT License. See LICENSE.txt
for more information.
LinkedIn: Giorgos Athanasoulias
Website: https://athanasu.com