api-demo
api-demo copied to clipboard
Client-side app using various Lichess APIs for demonstration purpose
Lichess OAuth app demo
This is an example for a fully client side OAuth app that uses various APIs.
Features
- Fully client side, no server needed
- Login with Lichess (OAuth2 PKCE)
- View ongoing games
- Play games
- Challenge the AI opponent
- Challenge a player
- Create a game seek
- Watch Lichess TV
Try it out
The demo app is hosted on Github Pages
Run it on your machine
npm installnpm run buildnpm run serveor any other method to serve the app on http://localhost:8000
Points of interest
- ND-JSON stream reader
- OAuth "Login with Lichess"
- Read the main event stream
- Game play
- Create a seek and await a game
- Challenge a player
- Watch Lichess TV
Feel free to reuse and learn from this code when building your own Lichess API app.