Environment Configuration
BarberApp uses environment files to manage configuration across different deployment environments. These files are gitignored for security.Creating Environment Files
Create development environment
Create
src/environments/environment.ts for development:src/environments/environment.ts
The production environment file is automatically used when building with
ng build due to file replacement configured in angular.json:74-79.Angular Configuration
BarberApp’s Angular workspace is configured inangular.json with specific settings for optimal development and production builds.
Project Settings
Schematic Configuration Details
Schematic Configuration Details
All Angular schematics use specific conventions:
- Components: OnPush change detection, no test files by default
- Services/Directives/Guards: Type separator using
.(e.g.,auth.service.ts) - Style: CSS files (Tailwind handles most styling)
Build Configurations
Development Build
angular.json (Line 81-85)
- No optimization for faster builds
- Source maps enabled for debugging
- License extraction disabled
Production Build
angular.json (Line 60-79)
- Bundle size budgets enforced
- Output hashing for cache busting
- Environment file replacement
- Full optimization enabled
Tailwind CSS Configuration
BarberApp uses Tailwind CSS 4.1.13 with custom theme configuration defined insrc/styles.css.
Custom Theme Variables
The application defines custom CSS variables using the@theme directive:
Global Styles
The application includes several global style enhancements:Typography
Typography
src/styles.css (Line 39-45)
Scroll Animations
Scroll Animations
src/styles.css (Line 48-66)
Focus Styles
Focus Styles
Custom focus-visible styles for better accessibility:
src/styles.css (Line 69-79)
Text Selection
Text Selection
src/styles.css (Line 82-90)
Using Custom Theme Values
Access custom theme variables in your components:Example Usage
Cloudinary Configuration
BarberApp uses Cloudinary for image storage and management, particularly for user profile pictures.Setting Up Cloudinary
Create Cloudinary Account
Sign up for a free account at cloudinary.com
Get Your Credentials
From your Cloudinary dashboard, note:
- Cloud Name: Found in the dashboard URL
- Upload Preset: Create an unsigned upload preset in Settings → Upload
Default Profile Image
The application uses a default profile image hosted on Cloudinary:src/app/services/firebase/firebase-auth.service.ts (Line 63)
You can replace this with your own default image by uploading to your Cloudinary account and updating the URL.
TypeScript Configuration
BarberApp uses strict TypeScript settings for type safety:tsconfig.json (Line 5-16)
Angular Compiler Options
tsconfig.json (Line 18-24)
Application Bootstrap
The application is bootstrapped insrc/main.ts with a minimal, modern approach:
src/main.ts
app.config.ts, including:
- Firebase providers
- Router configuration
- HTTP client
- Dependency injection tokens
- Locale settings
Next Steps
Firebase Setup
Configure Firebase services and deployment
Project Structure
Explore the clean architecture organization