Warning
This is an example project and not intended for production use. Proceed with caution.
A TypeScript-based application for ingesting and managing data from the Limitless API. This service fetches lifelogs from the Limitless API on a scheduled basis, stores them in a database, and provides a REST API and React dashboard for data visualization.
- Scheduled data ingestion from Limitless API
- SQLite database storage (extensible to other database types)
- REST API for data access and management
- React-based dashboard for data visualization
- Node.js (v14 or later)
- npm or yarn
- A Limitless API key
/
├── client/ # React client application
├── src/
│ ├── api/ # API interaction code
│ ├── db/ # Database adapters and initialization
│ ├── server/ # Express server and API routes
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ └── index.ts # Main application entry point
├── .env # Environment variables
└── package.json # Project dependencies and scripts
- Clone the repository:
git clone https://github.com/pricebaldwin/limitless-actions.git
cd limitless
- Install dependencies for the server:
npm install
- Install dependencies for the client:
cd client
npm install
cd ..
- Create a
.env
file in the root directory with the following content:
LIMITLESS_API_KEY=your_api_key_here
DB_TYPE=sqlite
DB_PATH=./data/limitless.db
PORT=3000
ENABLE_SERVER=true
INGESTION_SCHEDULE=*/30 * * * *
Replace your_api_key_here
with your actual Limitless API key.
- Start the server:
npm run dev
This will start the server with ts-node, which compiles TypeScript on the fly.
- In a separate terminal, start the client:
cd client
npm start
The client will be available at http://localhost:3000 (or another port if 3000 is already in use).
- Build the server:
npm run build
- Build the client:
cd client
npm run build
cd ..
- Start the production server:
npm start
GET /api/status
- Get service status and statisticsGET /api/lifelogs
- Get lifelogs with paginationPOST /api/ingest
- Trigger manual data ingestion
The application can be configured using environment variables in the .env
file:
LIMITLESS_API_KEY
- Your Limitless API keyDB_TYPE
- Database type (currently only 'sqlite' is supported)DB_PATH
- Path to the SQLite database filePORT
- Port for the HTTP serverENABLE_SERVER
- Set to 'true' to enable the HTTP serverINGESTION_SCHEDULE
- Cron schedule for data ingestion
npm run dev
- Start the development servernpm run build
- Build the server for productionnpm start
- Start the production servernpm test
- Run tests
MIT