An Angular 21 frontend for SnippetVault — a personal code snippet library with syntax highlighting, tag management, and JWT authentication.
Application: https://janlu89.github.io/SnippetVault-Client/
- SnippetVault-API — .NET 10 backend
- SnippetVault-Infra — Docker Compose orchestration
| Layer | Technology |
|---|---|
| Framework | Angular 21 |
| Language | TypeScript (strict mode) |
| UI Components | Angular Material |
| State Management | Angular Signals |
| Forms | Reactive Forms |
| Syntax Highlighting | ngx-highlightjs + highlight.js |
| Styling | SCSS with custom Material theme |
| Change Detection | Zoneless |
| Deployment | GitHub Pages via angular-cli-ghpages |
| CI/CD | GitHub Actions |
- JWT Authentication — register, login, persistent session via localStorage
- Smart Route Guards — redirects authenticated users away from login/register
- Snippet List — search by title/description, filter by language, pagination
- Syntax Highlighting — highlight.js github-dark theme across all languages
- Snippet Detail — full code display with ownership-aware edit/delete controls
- Create & Edit Forms — tag autocomplete, public/private toggle, language selector
- Confirmation Dialogs — Material dialog for destructive actions
- Global Notifications — snackbar feedback for all success and error states
- Responsive Layout — mobile and desktop breakpoints
- Centralised Routing —
API_ROUTESandAPP_ROUTESconstants prevent magic strings
Prerequisites: Node 22+
git clone https://github.com/janlu89/SnippetVault-Client.git
cd SnippetVault-Client/client
npm install
ng serveThe app will be available at http://localhost:4200
By default the app points to the production API at https://snippetvault-api.onrender.com/api. To point to a local API instead, update src/environments/environments.development.ts:
export const environment = {
production: false,
apiUrl: 'http://localhost:5000/api'
};See SnippetVault-Infra for the full stack setup.
src/
├── app/
│ ├── constants/ → API_ROUTES and APP_ROUTES
│ ├── guards/ → auth, guest, redirect guards
│ ├── interceptors/ → JWT auth interceptor
│ ├── models/ → TypeScript interfaces
│ ├── pages/ → login, register, snippet-list, snippet-detail, snippet-form
│ ├── services/ → auth, snippet, tag, notification, title services
│ └── shared/ → confirm-dialog component
├── environments/ → dev and prod environment configs
└── styles.scss → global styles and Material theme
GitHub Actions automatically builds and deploys to GitHub Pages on every push to master.