Skip to content

Repository files navigation

Recollection

A full-stack web application for managing and receiving daily reminders of book highlights and personal quotes with Kindle import functionality.

Features

  • User Authentication: Secure email/password registration and login with JWT sessions
  • Highlight Management: Add, edit, delete, and organize your book highlights and quotes
  • Kindle Import: Upload and parse Kindle highlight exports (.txt, .csv files)
  • Favorites System: Mark highlights as favorites for prioritization in daily reminders
  • Daily Email Reminders: Automated daily emails with up to 10 curated highlights
  • Search & Filter: Find highlights by text, source, or tags
  • Responsive Design: Mobile-friendly interface with dark mode support
  • Settings Management: Configure email preferences and reminder timing

Tech Stack

Frontend

  • React 18 with TypeScript
  • Vite for build tooling
  • TailwindCSS for styling
  • Shadcn/ui component library
  • Wouter for routing
  • TanStack Query for data fetching
  • React Hook Form with Zod validation

Backend

  • Node.js with Express
  • TypeScript
  • MongoDB with Mongoose ODM
  • JWT authentication with bcrypt
  • File upload with Multer
  • Email sending with Nodemailer
  • Scheduled jobs with node-cron

Getting Started

Prerequisites

  • Node.js 20 or higher
  • npm or yarn

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd recollection
  1. Install dependencies:
npm install
  1. Set up environment variables:
# Database configuration (required)
MONGODB_URI=mongodb://localhost:27017/recollection

# Email configuration (optional - for daily reminders)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
APP_URL=http://localhost:5000
  1. Start MongoDB:
# Using MongoDB service
mongod

# Or using Docker
docker run -d -p 27017:27017 --name mongodb mongo:latest
  1. Start the development server:
npm run dev

The application will be available at http://localhost:5000

Project Structure

├── client/                 # Frontend React application
│   ├── src/
│   │   ├── components/     # Reusable UI components
│   │   ├── hooks/          # Custom React hooks
│   │   ├── lib/            # Utilities and configurations
│   │   ├── pages/          # Page components
│   │   └── main.tsx        # Application entry point
│   └── index.html
├── server/                 # Backend Express application
│   ├── middleware/         # Express middleware
│   ├── services/           # Business logic services
│   ├── utils/              # Utility functions
│   ├── index.ts            # Server entry point
│   ├── routes.ts           # API routes
│   └── storage.ts          # Data storage layer
├── shared/                 # Shared types and schemas
│   └── schema.ts           # Database schema and validation
└── package.json

API Endpoints

Authentication

  • POST /api/auth/register - Create new user account
  • POST /api/auth/login - User login
  • POST /api/auth/logout - User logout
  • GET /api/auth/me - Get current user info

Highlights

  • GET /api/highlights - Get user's highlights (paginated)
  • POST /api/highlights - Create new highlight
  • PATCH /api/highlights/:id - Update highlight
  • DELETE /api/highlights/:id - Delete highlight
  • POST /api/highlights/:id/favorite - Toggle favorite status
  • GET /api/highlights/favorites - Get favorite highlights

Import

  • POST /api/import/kindle - Import highlights from Kindle file

User Management

  • GET /api/stats - Get user statistics
  • PATCH /api/user/preferences - Update email preferences

Features in Detail

Kindle Import

The application supports importing highlights from Amazon Kindle:

  1. Export your highlights from read.amazon.com
  2. Save as .txt or .csv file
  3. Upload through the import interface
  4. Highlights are automatically parsed and deduplicated

Daily Email Reminders

  • Configurable timing (6 AM - 8 PM)
  • Prioritizes favorite highlights
  • Sends up to 10 highlights per day
  • Tracks sent highlights to avoid repetition
  • Beautiful HTML email template

Data Management

  • MongoDB database with Mongoose ODM
  • Proper data validation with Zod schemas
  • Type-safe API with TypeScript
  • Schema validation and data modeling

Deployment

The application is designed to work seamlessly with:

  • Replit Deployments
  • Vercel
  • Netlify
  • Railway
  • Any Node.js hosting platform

For production deployment:

  1. Set up environment variables for email configuration
  2. Configure database connection (if using PostgreSQL)
  3. Build the application: npm run build
  4. Start the production server: npm start

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes: git commit -m 'Add feature-name'
  6. Push to the branch: git push origin feature-name
  7. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For support, email your-email@example.com or create an issue in the GitHub repository.

About

This reminds you of your kindles notes, quotes and web text that you have saved for later recollection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages