A monorepo containing the Librairian application - an AI-assisted document analysis and search interface focused on JFK assassination documents.
This monorepo contains the following packages:
client/: Next.js frontend applicationserver/: Backend server (to be added)shared/: Shared types and utilities
Librairian provides an interface for interacting with a collection of JFK-related documents and associated data. Key functionalities include:
- Browsing and viewing documents within the
/jfk-filessection. - Detailed views for specific documents and related individuals.
- Capturing new data points or sources.
- Searching and exploring the dataset.
- Various data visualizations to understand connections and timelines.
- Document Hub (
/jfk-files): Central interface for browsing, viewing, and managing JFK documents. Includes pagination and status tracking. - Detailed Views:
- View specific document details (
/jfk-files/[id]). - View profiles and connections for individuals (
/jfk-files/person/[name]).
- View specific document details (
- Data Visualizations: Includes multiple visualization types:
- Chronosphere
- Force Graph
- Geographic Map
- Timeline Chart
- Enhanced Map & Timeline Visualizations
- Backend API: Comprehensive API routes under
/api/handle authentication, data retrieval (documents, connections, profiles), processing, capture, and search functionalities.
- Node.js 18 or higher
- npm or yarn
From the root directory:
# Install all dependencies for all workspaces
npm install
# Or install dependencies for specific workspace
npm install --workspace=client# Setup Development Server
npm run install:all
npm run db:local
npm run post
# Start with npm
npm run dev:local
# OR
# Use Docker Compose
docker compose -f docker-compose.dev.yml up -d --build
# Start Client with npm
npm run dev:client- Node.js 18+
- NPM or Yarn
- PostgreSQL 12+ (running on port 5432)
-
Create a PostgreSQL database named
jfk_documents:createdb jfk_documentsIf you need to specify a user or different configuration, update the
DATABASE_URLin your.env.localfile. -
Run the database migrations:
npx prisma migrate dev
-
Clone the repository:
git clone https://github.com/devonjames/librairian-web.git cd librairian-web -
Install dependencies:
npm install # or yarn install -
Configure environment variables: Create a
.env.localfile in the root directory with the following variables:DATABASE_URL="postgresql://user@localhost:5432/jfk_documents?schema=public" NEXT_PUBLIC_API_URL=https://api.oip.onl NEXT_PUBLIC_WEBSITE_URL=http://localhost:3000 JWT_SECRET=your-jwt-secret NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret
You can run the application using the provided shell script, which will run the database migrations and start the development server:
chmod +x run-jfk-files.sh
./run-jfk-files.shAlternatively, you can run the commands manually:
-
Run Prisma migrations:
npx prisma migrate dev -
Start the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the application.
The project follows a structure typical for Next.js applications using the App Router:
/app: Contains core application logic, including pages (routes) and API routes./components: Shared React components used across the application./hooks: Custom React hooks./lib: Core library functions, potentially including database interactions or external API clients./prisma: Prisma schema and related database files./public: Static assets (images, fonts, etc.) directly accessible via the web server./scripts: Utility scripts for various tasks (e.g., database seeding, deployment)./utils: General utility functions.
- Frontend: Next.js (App Router), React, Tailwind CSS
- Backend: Next.js API Routes
- Authentication: Likely NextAuth.js or similar (based on
/api/auth/) (not yet included) - Data Storage: Local storage (client-side) with optional database integration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0.