This project is a real Pokedex implementation using Weaviate (a neural network and a vector database) to recognize the Pokemon. The frontend is a React Native app which uses a Hono server to communicate with Weaviate.
pokedex-ai.MP4
Note
Both devices need to be connected to the same network.
cd pokemon-ai-app
You need to create a .env
file in the root of the project with the following content:
LOCAL_IP='your_local_ip'
Note
Replace your_local_ip
with your local IP address.
To get your local IP address, you can run the following command:
ipconfig getifaddr en0
Warning
This command is for macOS. If you are using another OS, you need to find the equivalent command.
npm install
npm run ios
npm run format
cd pokemon-engine
bun install
To run Weaviate, you need to have Docker installed. Then, you can run the following command:
docker-compose up -d
To run Hono API Server, you can run the following command:
bun start
bun test
To test Weaviate, you can run the following command:
bun run tests/quick-engine-test.ts
You can make a POST request to http://localhost:3000/pokedex
with the following body:
{
"image": "[your_image_base64]"
}
Note
Replace [your_image_base64]
with the base64 of the image you want to test.
You should have something like this:
To test Hono API Server, you can run the following command while the server is running:
curl -X POST http://localhost:3000/pokedex \
-H "Content-Type: application/json" \
-d '{"image": "[your_image_base64]"}'
Note
Replace [your_image_base64]
with the base64 of the image you want to test.
bun format
npx oxlint