Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

paulbgtr/mastosearch-arch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

mastosearch

mastosearch is a simple search engine for Mastodon instances. It uses AI to query the the Mastodon Instances API and return the most relevant instances based on the user's query.

Features

  • Search for Mastodon instances based on a query
  • Get a list of the most relevant instances based on the query

Technologies

Frontend

Backend

Docs

The project doesn't have any documentation in its traditional sense. The project doesn't have traditional documentation. However, all core functionality is documented using JSDoc and through MDX in Ladle.

Development

First things first, you need to clone the repository:

git clone https://github.com/paulbgtr/mastosearch

Then, in order to run the app locally, you would need to setup the backend and the frontend.

Frontend

Running the frontend

The frontend is a simple Vite/React app. To run it, you need to install the dependencies and start the development server:

cd frontend
bun i
bun dev

Ladle

For those of you who want to be speedy in the kitchen, you can use the bun ladle command to launch ladle and interact with the core components in isolation.

In ladle, you can view the rest of the documentation related to the components and view the components in isolation.

Backend

Environment variables

  1. Obtain your API key from the Mastodon Instances API and from the OpenAI API.
  2. Create a .env file in the backend directory and add the following environment variables:
OPENAI_API_KEY=your_openai_api_key
MASTODON_INSTANCES_API_KEY=your_mastodon_instances_api_key

Running the backend

The backend is an Express app powered by bun and TypeScript. To run it, you need to install the dependencies and start the development server:

cd backend
bun i
bun dev