plckr / full-text-search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full-Text Search Proof of Concept with SvelteKit, Prisma, and PostgreSQL

This project demonstrates the implementation of full-text search in a PostgreSQL database, leveraging SvelteKit as the frontend framework and Prisma for database management.

It's designed to showcase how full-text search can be effectively utilized within a web application.

Requirements

  • Node.js
  • npm
  • PostgreSQL database

Setup

Before running the project, ensure you have a PostgreSQL database accessible. The connection details should be specified in a .env file at the root of the project directory.

.env Configuration

Create a .env file in the root directory and fill in your PostgreSQL database connection details:

DATABASE_URL="postgresql://admin:admin@localhost:55434/fts?schema=public"

Above url is the url generated from the docker-compose.yml file.

Feel free to change if you need to.

Project Installation

Run database with docker-compose

docker-compose up -d

Install dependencies:

npm install

Update database schema

npm run prisma:deploy

Running the project

To run the project in development mode:

npm run dev

Credits

About


Languages

Language:TypeScript 42.7%Language:JavaScript 25.4%Language:Svelte 19.9%Language:PLpgSQL 7.3%Language:HTML 3.4%Language:CSS 1.3%