Modern web application for creating, editing, and managing GitHub Gists with advanced features and customizable theming.
- GitHub OAuth authentication - Secure login with GitHub account
- Gist management - Create, edit, delete, and organize your gists
- Multi-file support - Manage multiple files within a single gist
- Smart title generation - Automatic descriptive titles from file metadata
- Live Markdown preview - Real-time preview while editing Markdown files
- Advanced search - Search by title, filename, content with filters
- Community sharing - Share and discover gists from other users
- Modern CSS variable-based theming - Consistent design across the app
- Three theme modes - Light, Dark, and Custom themes
- Theme Sandbox - Visual theme editor with live preview
- Customizable colors - Modify 12+ color properties including:
- Primary colors (buttons, links, highlights)
- Background and surface colors
- Text hierarchy colors
- UI elements (borders, success, warning, danger)
- Responsive design - Works on desktop, tablet, and mobile
- Collapsible sidebar - Space-efficient navigation
- Toast notifications - User-friendly feedback system
- File format conversion - Convert between Markdown, HTML, and plain text
- Syntax highlighting - Code display with language detection
- Per-user cache isolation - Enhanced security and performance
- Node.js 18+ (recommended) or 14+ (minimum)
- Yarn package manager
- GitHub account
- GitHub OAuth application credentials
-
Clone repository:
git clone https://github.com/yourusername/gist-manager.git cd gist-manager -
Install dependencies:
yarn install:all
This will install dependencies for both client and server workspaces.
-
Configure environment: Create
.envfile with:GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_SECRET=your_client_secret REDIRECT_URI=http://localhost:3000/callback FRONTEND_URL=http://localhost:3000 SESSION_SECRET=your_secure_random_string NODE_ENV=development REACT_APP_GITHUB_CLIENT_ID=your_client_id REACT_APP_REDIRECT_URI=http://localhost:3000/callback REACT_APP_BACKEND_URL=http://localhost:3000
Start both client and server in development mode:
yarn devCreate optimized production build:
yarn build:prodServe production build:
yarn serve:prodStart server only:
yarn start:serverStart client only:
yarn start:clientRun test suite:
yarn testRemove all dependencies and build files:
yarn clean- OAuth 2.0 - GitHub authorization code flow
- Session management - Secure HTTP-only cookies
- Token caching - Per-user isolated cache with security boundaries
- Automatic token refresh - Seamless user experience
GET /api/auth/github- Initiate OAuth flowGET /api/auth/callback- Handle OAuth callbackPOST /api/auth/logout- Clear session and cache
GET /api/gists- Fetch user's gistsGET /api/gists/:id- Get specific gistPOST /api/gists- Create new gistPUT /api/gists/:id- Update existing gistDELETE /api/gists/:id- Delete gist
GET /api/shared-gists- Browse shared gistsPOST /api/shared-gists- Share a gistDELETE /api/shared-gists/:id- Unshare a gist
gist-manager/
├── client/ # React frontend workspace
│ ├── public/ # Static assets
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── common/ # Reusable UI components
│ │ │ ├── markdown/ # Markdown rendering
│ │ │ └── ... # Feature components
│ │ ├── contexts/ # React contexts
│ │ │ ├── AuthContext.js
│ │ │ ├── ThemeContext.js
│ │ │ └── ToastContext.js
│ │ ├── services/ # API service layer
│ │ │ └── api/ # API endpoints
│ │ ├── styles/ # CSS and theme files
│ │ │ ├── index.css
│ │ │ ├── modern-theme.css
│ │ │ └── ... # Component styles
│ │ └── utils/ # Utility functions
│ └── package.json
├── server/ # Express backend workspace
│ ├── controllers/ # Request handlers
│ ├── routes/ # API route definitions
│ ├── server.js # Main server file
│ └── package.json
├── data/ # Persistent data storage
│ └── sharedGists.json # Community gists database
└── package.json # Root workspace configuration
- React 18 - Modern React with hooks
- React Router - Client-side routing
- Tailwind CSS - Utility-first styling
- CSS Variables - Dynamic theming
- React Icons - Icon library
- Prism.js - Syntax highlighting
- Express.js - Web framework
- express-session - Session management
- node-cache - In-memory caching
- axios - HTTP client
- cors - Cross-origin support
- Per-user cache isolation - Prevents cross-user data leakage
- Secure session management - HTTP-only cookies with proper SameSite settings
- Token validation - Ensures tokens are valid before API calls
- CORS configuration - Restricts API access to authorized origins
- Environment variable protection - Sensitive data kept in
.envfiles
Contributions are welcome! Please ensure:
- Code follows existing patterns and conventions
- New features include appropriate documentation
- Changes maintain backward compatibility
- Security best practices are followed
GNU Affero General Public License v3.0