|
1 | | -# AngularBlogApp |
| 1 | +# Angular Blog Application |
2 | 2 |
|
3 | | -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.1. |
| 3 | +A modern, feature-rich blog application built with Angular 19 and Supabase. This application provides a responsive, user-friendly interface for reading blog posts and an admin panel for content management. |
4 | 4 |
|
5 | | -## Development server |
| 5 | +## Features |
6 | 6 |
|
7 | | -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. |
| 7 | +### Reader Interface |
8 | 8 |
|
9 | | -## Code scaffolding |
| 9 | +- **Blog Post Listing**: Browse all published blog posts with previews |
| 10 | +- **Post Details**: View full blog posts with formatted content |
| 11 | +- **Comments System**: Read and add comments to blog posts |
| 12 | +- **Code Highlighting**: Syntax highlighting for code blocks with expandable modal view |
| 13 | +- **Responsive Design**: Optimized for all device sizes using Tailwind CSS and DaisyUI |
10 | 14 |
|
11 | | -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. |
| 15 | +### Admin Interface |
12 | 16 |
|
13 | | -## Build |
| 17 | +- **Authentication**: Secure admin access with Supabase authentication |
| 18 | +- **Post Management**: Create, edit, and delete blog posts |
| 19 | +- **Rich Text Editor**: Quill-based editor with support for formatting, images, and code blocks |
| 20 | +- **Unsaved Changes Protection**: Guards against accidental navigation away from unsaved content |
14 | 21 |
|
15 | | -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. |
| 22 | +## Technologies Used |
16 | 23 |
|
17 | | -## Running unit tests |
| 24 | +### Frontend |
18 | 25 |
|
19 | | -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). |
| 26 | +- **Angular 19**: Latest version with standalone components and signals |
| 27 | +- **NgRx Signals**: For state management |
| 28 | +- **Tailwind CSS**: For styling with utility classes |
| 29 | +- **DaisyUI**: Component library for Tailwind CSS |
| 30 | +- **Quill Editor**: Rich text editor for content creation |
| 31 | +- **Highlight.js**: Syntax highlighting for code blocks |
20 | 32 |
|
21 | | -## Running end-to-end tests |
| 33 | +### Backend |
22 | 34 |
|
23 | | -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. |
| 35 | +- **Supabase**: Backend-as-a-Service for: |
| 36 | + - Database (PostgreSQL) |
| 37 | + - Authentication |
| 38 | + - Storage |
| 39 | + - Serverless Functions |
24 | 40 |
|
25 | | -## Further help |
| 41 | +### Development & Deployment |
26 | 42 |
|
27 | | -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. |
| 43 | +- **Angular SSR**: Server-Side Rendering for improved performance and SEO |
| 44 | +- **TypeScript**: For type-safe code |
| 45 | +- **Webpack Bundle Analyzer**: For optimizing bundle size |
28 | 46 |
|
29 | | -hehe |
30 | | -hehe2 |
| 47 | +## Project Structure |
| 48 | + |
| 49 | +``` |
| 50 | +src/ |
| 51 | +├── app/ |
| 52 | +│ ├── admin/ # Admin interface components and services |
| 53 | +│ ├── auth/ # Authentication components and guards |
| 54 | +│ ├── reader/ # Public blog reading interface |
| 55 | +│ ├── services/ # Shared services |
| 56 | +│ ├── shared/ # Shared components |
| 57 | +│ ├── types/ # TypeScript type definitions |
| 58 | +│ └── utils/ # Utility functions |
| 59 | +├── environments/ # Environment configuration |
| 60 | +└── styles.scss # Global styles |
| 61 | +``` |
| 62 | + |
| 63 | +## Setup and Installation |
| 64 | + |
| 65 | +### Prerequisites |
| 66 | + |
| 67 | +- Node.js (v18 or later) |
| 68 | +- npm (v10 or later) |
| 69 | +- Angular CLI (v19 or later) |
| 70 | + |
| 71 | +### Installation Steps |
| 72 | + |
| 73 | +1. Clone the repository |
| 74 | + ```bash |
| 75 | + git clone <repository-url> |
| 76 | + cd angular-blog-app |
| 77 | + ``` |
| 78 | + |
| 79 | +2. Install dependencies |
| 80 | + ```bash |
| 81 | + npm install |
| 82 | + ``` |
| 83 | + |
| 84 | +3. Set up environment variables |
| 85 | + - Create a Supabase project at [supabase.com](https://supabase.com) |
| 86 | + - Update the environment files with your Supabase URL and anon key |
| 87 | + |
| 88 | +4. Run the development server |
| 89 | + ```bash |
| 90 | + npm start |
| 91 | + ``` |
| 92 | + |
| 93 | +5. Navigate to `http://localhost:4200/` to view the application |
| 94 | + |
| 95 | +## Building for Production |
| 96 | + |
| 97 | +Run `npm run build` to build the project for production. The build artifacts will be stored in the `dist/` directory. |
| 98 | + |
| 99 | +## Deployment |
| 100 | + |
| 101 | +The application can be deployed to any static hosting service that supports Angular applications with SSR, such as: |
| 102 | + |
| 103 | +- Vercel |
| 104 | +- Netlify |
| 105 | +- Firebase APP Hosting |
| 106 | + |
| 107 | +## Contributing |
| 108 | + |
| 109 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 110 | + |
| 111 | +## License |
| 112 | + |
| 113 | +This project is licensed under the MIT License - see the LICENSE file for details. |
0 commit comments