{"id":49394801,"url":"https://github.com/ashref-dev/blank-notes","last_synced_at":"2026-04-28T15:03:37.643Z","repository":{"id":306662534,"uuid":"1026836481","full_name":"Ashref-dev/blank-notes","owner":"Ashref-dev","description":"A modern, elegant note-taking application with a local-first approach.","archived":false,"fork":false,"pushed_at":"2026-02-01T01:13:27.000Z","size":44429,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-01T08:04:39.105Z","etag":null,"topics":["go","golang","javascript","postgresql","tailwindcss"],"latest_commit_sha":null,"homepage":"https://blank.ashref.tn","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ashref-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-26T18:03:02.000Z","updated_at":"2026-02-01T01:13:31.000Z","dependencies_parsed_at":"2025-09-21T02:32:28.221Z","dependency_job_id":null,"html_url":"https://github.com/Ashref-dev/blank-notes","commit_stats":null,"previous_names":["ashref-dev/blank-notes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ashref-dev/blank-notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fblank-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fblank-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fblank-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fblank-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ashref-dev","download_url":"https://codeload.github.com/Ashref-dev/blank-notes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ashref-dev%2Fblank-notes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32385943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","javascript","postgresql","tailwindcss"],"created_at":"2026-04-28T15:03:09.688Z","updated_at":"2026-04-28T15:03:37.637Z","avatar_url":"https://github.com/Ashref-dev.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blank.ashref.tn - Minimalist Note Taking App\n\nA modern, elegant note-taking application with a local-first approach. Built with Go (Gin) backend and vanilla JavaScript frontend. Features instant local storage for notes with optional cloud sharing via PostgreSQL.\n\n## Screenshot\n\n![Blank Note Taking App](shot.jpeg)\n\n## Features\n\n- **Local-First Storage**: Notes saved instantly to browser localStorage - no network delays\n- **Minimalist Interface**: Clean, distraction-free writing environment with generous spacing\n- **Instant Auto-save**: Notes are saved immediately as you type (no 2-second delays)\n- **Note Organization**: Sidebar with all your notes, sorted by last modified\n- **Optional Cloud Sharing**: Generate shareable links with configurable expiration times\n- **Dark Mode**: Toggle between light and dark themes (saved in localStorage)\n- **Download**: Export notes as .txt or .md files\n- **Real-time Word Count**: Live word and character counting\n- **Responsive Design**: Works perfectly on desktop and mobile devices\n- **Keyboard Shortcuts**: Full keyboard navigation support\n\n## Tech Stack\n\n- **Frontend**: Vanilla JavaScript with localStorage for instant note management\n- **Backend**: Go with Gin web framework (only for sharing functionality)\n- **Local Storage**: Browser localStorage for primary note storage\n- **Cloud Storage**: PostgreSQL (only for shared notes)\n- **Styling**: Tailwind CSS with Cousine font\n- **Templates**: Go HTML templates for sharing pages\n- **HTTP Requests**: Native Fetch API for sharing functionality\n\n## Prerequisites\n\n- Go 1.18 or higher\n- PostgreSQL 12 or higher (only needed for sharing functionality)\n\n## Setup\n\n1. **Clone or extract the project**\n   ```bash\n   cd blankpage_app\n   ```\n\n2. **Install Go dependencies**\n   ```bash\n   go mod tidy\n   ```\n\n3. **Set up PostgreSQL (Optional - only for sharing)**\n   \n   If you want to use the sharing functionality, create a PostgreSQL database:\n   ```sql\n   CREATE USER blankpage WITH PASSWORD 'blankpage';\n   CREATE DATABASE blankpage OWNER blankpage;\n   ```\n\n   Set the DATABASE_URL environment variable:\n   ```bash\n   export DATABASE_URL=\"postgres://blankpage:blankpage@localhost:5432/blankpage?sslmode=disable\"\n   ```\n\n4. **Run the application**\n   ```bash\n   go run .\n   ```\n\n5. **Access the application**\n   Open your browser and navigate to `http://localhost:8080`\n\n**Note**: The app works perfectly without PostgreSQL - you'll just be unable to share notes publicly. All note-taking functionality works with localStorage only.\n\n## Configuration\n\n### Environment Variables\n\n- `PORT`: Server port (default: 8080)\n- `DATABASE_URL`: PostgreSQL connection string (optional, only for sharing)\n\n### Local Storage\n\nThe app uses browser localStorage with the key `blankpage_notes` to store all your notes locally. Notes are structured as:\n\n```javascript\n{\n  \"note_1234567890_abc123\": {\n    \"id\": \"note_1234567890_abc123\",\n    \"title\": \"Auto-generated from first line\",\n    \"content\": \"Your note content here...\",\n    \"createdAt\": \"2025-07-26T10:30:00.000Z\",\n    \"updatedAt\": \"2025-07-26T10:35:00.000Z\"\n  }\n}\n```\n\n## API Endpoints\n\n### Core Application\n- `GET /` - Main application (serves the note-taking interface)\n- `GET /health` - Health check endpoint\n\n### Sharing API (Optional - requires PostgreSQL)\n- `POST /api/share` - Create a shareable link from local note\n- `GET /shared/:shareId` - View shared note in browser\n\n**Note**: All note CRUD operations happen locally in the browser. The backend is only used for sharing functionality.\n\n## Database Schema\n\n**Note**: Database is only used for shared notes. All personal notes are stored in browser localStorage.\n\n### Notes Table (for sharing only)\n```sql\nCREATE TABLE notes (\n    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n    title TEXT NOT NULL,\n    content TEXT,\n    created_at TIMESTAMP DEFAULT NOW(),\n    updated_at TIMESTAMP DEFAULT NOW()\n);\n```\n\n### Shared Notes Table\n```sql\nCREATE TABLE shared_notes (\n    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n    note_id UUID NOT NULL REFERENCES notes(id),\n    created_at TIMESTAMP DEFAULT NOW(),\n    expires_at TIMESTAMP\n);\n```\n\n## Usage\n\n### Creating Notes\n1. Start typing immediately in the main editor area\n2. Notes are saved instantly to localStorage as you type\n3. Click \"New Note\" or use Ctrl+N to create additional notes\n4. The first line automatically becomes the note title\n\n### Organizing Notes\n- All notes appear in the sidebar, sorted by last modified\n- Click any note in the sidebar to switch to it\n- Delete notes using the trash icon in the sidebar\n- Notes persist between browser sessions via localStorage\n\n### Sharing Notes (Optional)\n1. Write your note in the editor\n2. Click the \"Share\" button in the top navigation\n3. Choose an expiration time (1 hour, 24 hours, 7 days, 30 days, or never)\n4. Click \"Create Share Link\" to generate a public URL\n5. Copy and share the link with others\n\n### Local Storage Benefits\n- **Instant saving**: No network delays or loading spinners\n- **Offline first**: Works without internet connection\n- **Privacy**: Notes stay on your device unless you explicitly share them\n- **Performance**: Lightning-fast switching between notes\n\n### Keyboard Shortcuts\n- `Ctrl+N` (or `Cmd+N`): Create new note\n- `Ctrl+D` (or `Cmd+D`): Toggle dark mode\n- `Ctrl+S` (or `Cmd+S`): Manual save (auto-save is always active)\n- `Escape`: Close open menus\n\n### Themes\n- Click the \"🌓 Theme\" button to toggle between light and dark mode\n- Theme preference is saved in browser localStorage\n- Respects system dark mode preference by default\n\n### Sound Effects\n- Click the \"🔊 Sound\" button to toggle typewriter sounds\n- Sound preference is saved in browser localStorage\n\n## Development\n\n### Project Structure\n```\nblankpage_app/\n├── api/\n│   ├── app.go              # All application logic (handlers, models, routing)\n│   ├── templates/          # HTML templates (embedded)\n│   │   ├── index.html\n│   │   ├── sidebar.html\n│   │   └── ...\n│   └── static/             # Static assets (embedded)\n│       ├── css/style.css\n│       └── js/app.js\n├── main.go                 # Local development entry point\n├── go.mod                  # Go module definition\n├── vercel.json             # Vercel deployment config\n└── README.md\n```\n\n**Note**: All business logic is in `/api/app.go`. The root `main.go` is a thin wrapper for local development that imports from the `api` package. This structure eliminates code duplication while supporting both local development and Vercel deployment.\n\n### Adding Features\n1. Add new routes in `/api/app.go` (in `setupRoutes` function)\n2. Implement handlers in `/api/app.go`\n3. Update models in `/api/app.go`\n4. Create templates in `/api/templates/`\n5. Add styles to `/api/static/css/style.css`\n6. Add JavaScript to `/api/static/js/app.js`\n\n### Database Migrations\nThe application uses GORM's auto-migration feature. To add new fields:\n1. Update the model structs in `/api/app.go`\n2. Restart the application\n3. GORM will automatically create new columns\n\n## Deployment\n\n### Docker (Recommended)\nCreate a `Dockerfile`:\n```dockerfile\nFROM golang:1.21-alpine AS builder\nWORKDIR /app\nCOPY go.mod go.sum ./\nRUN go mod download\nCOPY . .\nRUN go build -o main .\n\nFROM alpine:latest\nRUN apk --no-cache add ca-certificates\nWORKDIR /root/\nCOPY --from=builder /app/main .\n# Templates and static files are embedded in the binary\nCMD [\"./main\"]\n```\n\n### Environment Variables for Production\n```bash\nexport PORT=8080\nexport DATABASE_URL=\"postgres://user:password@host:port/dbname?sslmode=require\"\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test thoroughly\n5. Submit a pull request\n\n## License\n\nThis project is open source and available under the MIT License.\n\n## Support\n\nFor issues and questions, please create an issue in the project repository.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashref-dev%2Fblank-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashref-dev%2Fblank-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashref-dev%2Fblank-notes/lists"}