Full text search and AI summarise of Maldivian gazette.
# clone the repo
git clone https://github.com/meekaaku/gazzetey.git
# Rename .env.sample to .env and fill in the values
mv .env.sample .env
# Install dependencies
npm install
# Download pdfs from urls.txt
wget -P <path to documents> -i urls.txt
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
-
After install, download the pdf files from urls.txt and save to DOCUMENTS_FOLDER. /admin path is for admin tasks.
-
Extract first page of pdf as image and save to image folder. Then upload these to a CDN for faster loading.
-
Extract pdf text and save to db.
-
Build typesense index
-
When user searches, use typesense to get search result, show the first page of pdf image that was extracted
-
When AI summarise requested, chunk the text and use Claude to summarise. Save the summary to db so next time you dont need to call Claude.
-
AI summary streaming
-
Chat with the the database