Readica is a web application for managing and reading your personal library of PDF documents. It allows you to upload your papers, extract metadata, and organize them for easy access.
- PDF Upload: Upload your PDF files to your personal library.
- Metadata Extraction: Automatically extracts metadata (title, authors, etc.) from your PDFs.
- Library Management: View and organize your uploaded documents.
- Status Tracking: Mark papers with a status like "reading", "read", or "read later".
- Filtering and Sorting: Easily find papers by filtering by status or sorting by different fields.
- Secure Storage: Files are securely stored using Backblaze B2.
- Next.js, Tailwind, Shadcn, Zustand, Tanstack Query, Lector.
- Express, Backblaze b2, multer, pdf-lib
Follow these instructions to get the project up and running on your local machine.
- Node.js (v18 or later)
- pnpm (or npm/yarn)
- A Backblaze B2 account for file storage.
-
Clone the repository:
git clone https://github.com/your-username/readica.git cd readica -
Setup the Server:
cd server pnpm install- Create a
.envfile in theserverdirectory and add the following environment variables:
BACKBLAZE_KEY_ID=YOUR_BACKBLAZE_KEY_ID BACKBLAZE_APP_KEY=YOUR_BACKBLAZE_APP_KEY BACKBLAZE_BUCKET_ID=YOUR_BACKBLAZE_BUCKET_ID - Create a
-
Setup the Client:
cd ../client pnpm install- Create a
.env.localfile in theclientdirectory. Please copy the contents from.env.exampleand fill in the necessary values for your environment. This will likely include NextAuth.js secrets and the URL of your backend server.
# Example NEXT_PUBLIC_SERVER_URL=http://localhost:3001 NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=YOUR_NEXTAUTH_SECRET - Create a
-
Start the backend server:
cd server nodemon index.mjsThe server will be running on
http://localhost:3001. -
Start the frontend client:
cd client pnpm run devThe client will be running on
http://localhost:3000.
The backend server exposes the following REST API endpoints:
POST /upload: Uploads a PDF file. The file should be sent asmultipart/form-datawith the keyfile. It returns a file ID and extracted metadata.POST /extract-metadata: Extracts metadata from a PDF file without uploading it to cloud storage. The file should be sent asmultipart/form-datawith the keyfile.
The Next.js client also has its own API routes under client/src/app/api/ for handling things like authentication, proxying requests, and interacting with the backend.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
Please make sure to update tests as appropriate.
This project is licensed under the MIT License.