Skip to content

da-vinci-noob/bookmark-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookmark Manager

A privacy-focused, self-hosted bookmark management solution built with Ruby on Rails and Vue.js. Take control of your bookmarks and keep your data private by hosting it on your own infrastructure.

Demo

Live URL: https://bookmarks.da-vinci-noob.com

Username: demo@test.com
Password: demo@test.com

Note: All the Bookmarks and Tags will be deleted everyday

Authentication Homepage
Bookmarks Tags
MobileBookmarks MobileTags

Why Self-Host?

  • Complete Privacy: Your bookmarks and data stay on your own server
  • No Third-Party Tracking: No external services or analytics
  • Data Ownership: Full control over your bookmark data and how it's stored
  • Customizable: Modify and extend the application to suit your needs
  • Open Source: Transparent codebase with no hidden functionality

Features

  • Modern, responsive interface built with Vue.js
  • Create, edit, and manage bookmarks with ease
  • Powerful tagging system for better organization
  • Advanced search and filtering capabilities
  • Mobile-friendly design with dedicated mobile navigation
  • Dark/Light theme support
  • Fast and efficient bookmark management
  • Secure authentication system

Tech Stack

Backend

  • Ruby on Rails 7
  • PostgreSQL database

Frontend

  • Vue.js 3 with Composition API
  • Vite.js for fast development and building
  • Tailwind CSS for modern, responsive styling

Prerequisites

  • Ruby
  • Node.js and Yarn
  • PostgreSQL

Initial Setup

Before running the application, you'll need to set up your Rails master key. You can generate it using Docker without installing Rails locally:

  1. Remove the existing credentials file as it won't work with a new master key:
rm config/credentials.yml.enc
  1. Generate a secure key using OpenSSL:
openssl rand -hex 32
  1. Create a new file named config/master.key with the generated key:
echo "your-generated-key" > config/master.key
  1. Keep your master.key secure - it's automatically ignored by git for security.

Setup

  1. Clone the repository:
git clone git@github.com:your-username/bookmark-manager.git
cd bookmark-manager
  1. Install dependencies:
bundle install
yarn install
  1. Setup database:
rails db:create db:migrate
  1. Start the servers:
./bin/dev

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

Docker Setup

The project includes a production-ready Dockerfile for easy deployment. You can deploy the application using Docker with these steps:

  1. Build the Docker image:
docker build -t bookmark_manager .
  1. Run the container:
docker run -d \
  -p 80:80 \
  -e SECRET_KEY_BASE_DUMMY=1 \
  -e DB_HOST=<your-db-host> \
  -e BOOKMARK_MANAGER_DATABASE_USERNAME=<your-db-user> \
  -e BOOKMARK_MANAGER_DATABASE_PASSWORD=<your-db-password> \
  --name bookmark_manager \
  bookmark_manager

Environment Variables

  • DB_HOST: PostgreSQL database host
  • BOOKMARK_MANAGER_DATABASE_USERNAME: Database username
  • BOOKMARK_MANAGER_DATABASE_PASSWORD: Database password
  • RAILS_ENV: Set to "production" by default

Using Docker Compose

Create a docker-compose.yml file:

version: '3.8'
services:
  web:
    build: .
    ports:
      - "80:80"
    environment:
      - SECRET_KEY_BASE_DUMMY=1
      - DB_HOST=db
      - BOOKMARK_MANAGER_DATABASE_USERNAME=postgres
      - BOOKMARK_MANAGER_DATABASE_PASSWORD=password
    depends_on:
      - db
    restart: unless-stopped

  db:
    image: postgres:15
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=bookmark_manager
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
    restart: unless-stopped

volumes:
  postgres_data:

Then run:

docker-compose up -d

The application will be available at http://localhost

Security Notes

  • Always use strong passwords in production
  • Store sensitive environment variables securely
  • Consider using Docker secrets or environment files
  • Keep your Docker images updated

Configuration

User Registration

By default, new user registrations are enabled. To disable user registrations (e.g., for a private instance), set the DISABLE_REGISTRATIONS environment variable:

# Disable new user registrations
export DISABLE_REGISTRATIONS=true

# Or in your .env file
DISABLE_REGISTRATIONS=true

When registrations are disabled:

  • The registration link will be hidden from the login page
  • Registration routes will be disabled
  • Any attempts to create new users will be blocked

Link Preview Setup

To enable automatic thumbnail generation for your bookmarks:

  1. Sign up for a free API key at LinkPreview.net
  2. After signing up, copy your API key from the dashboard
  3. Add the API key to your environment variables:

For local development, add to your .env file:

LINK_PREVIEW_API_KEY=your_api_key_here

For Docker deployment, add the environment variable:

docker run -d \
  -p 80:80 \
  -e SECRET_KEY_BASE_DUMMY=1 \
  -e DB_HOST=your-db-host \
  -e BOOKMARK_MANAGER_DATABASE_USERNAME=your-db-user \
  -e BOOKMARK_MANAGER_DATABASE_PASSWORD=your-db-password \
  -e LINK_PREVIEW_API_KEY=your_api_key_here \
  --name bookmark_manager \
  bookmark_manager

If using Docker Compose, add to the web service environment:

services:
  web:
    environment:
      - LINK_PREVIEW_API_KEY=your_api_key_here
      # ... other environment variables

Note: LinkPreview.net offers a free tier suitable for personal use, which includes:

  • 60 Requests / per hour
  • SSL encryption
  • Preview image URLs
  • Meta tags extraction

Development

  • Rails API endpoints are defined in config/routes.rb
  • Vue.js components are located in app/frontend/components
  • Database configuration is in config/database.yml

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published