Overview
This guide will help you run the Odontología Frontend application on your local machine for development purposes. After completing the installation, you’ll be able to start the development server and access the application in your browser.Make sure you’ve completed the Installation steps before proceeding with this guide.
Starting the Development Server
Start the Development Server
Run the development server using npm:
All three commands above are equivalent.
npm start is an alias for ng serve as defined in package.json.Wait for Compilation
The Angular CLI will compile your application. This may take 30-60 seconds on the first run.Expected Output:
Logging In
The application includes test user credentials for development:Dentist Access
Receptionist Access
Login Flow
- Enter email and password on the login page
- Click “Iniciar Sesión” (Login)
- On successful authentication, you’ll be redirected to the home dashboard
- The user role is stored in localStorage for session management
Exploring the Application
Once logged in, you can explore the main features:Dashboard (Home)
The home page provides an overview of clinic operations and quick access to key functions.Route:
/homePatient Management
View, search, and manage patient records.Routes:
/patient- Patient list with search functionality/patient/new- Add new patient/patient/:id- View patient details
- Search patients by name, email, or phone
- View complete medical history
- Track allergies and family history
- Access billing information
Appointments
Manage patient appointments and schedule new consultations.Routes:
/citas- Appointment list/calendar- Calendar view
- Schedule new appointments
- View appointment status (confirmed, pending, urgent)
- Track doctor assignments
Sample Data
The application comes with pre-populated sample data for testing:Sample Patients
- activo - Active patients with scheduled appointments
- pendiente - Patients pending follow-up
- urgente - Patients requiring urgent care
Development Features
Hot Module Replacement
The development server supports automatic reloading. Any changes to source files will trigger:- Incremental Compilation - Only changed files are recompiled
- Automatic Browser Refresh - The browser automatically reloads
- Fast Rebuild - Subsequent builds complete in 1-3 seconds
Development Commands
Here are the available npm scripts for development:Project Structure Overview
Understanding the key directories:Component Architecture
The application uses Angular 21’s standalone components:Standalone components don’t require NgModule declarations, simplifying the application architecture.
Service Pattern
Services provide shared data and business logic:Troubleshooting
Port 4200 already in use
Port 4200 already in use
If port 4200 is already in use, you can specify a different port:Or stop the existing process:
Compilation errors after file changes
Compilation errors after file changes
Sometimes the Angular CLI may encounter issues with incremental compilation:
- Stop the development server (Ctrl+C)
- Delete the Angular cache:
- Restart the server:
Browser shows 'Cannot GET /'
Browser shows 'Cannot GET /'
This usually means the dev server isn’t running or failed to start:
- Check the terminal for error messages
- Ensure all dependencies are installed:
npm install - Try clearing node_modules and reinstalling:
Login not working / navigation fails
Login not working / navigation fails
Styles not loading correctly
Styles not loading correctly
The application uses Boxicons and custom CSS:
- Verify Boxicons is in node_modules:
ls node_modules/boxicons - Check angular.json includes Boxicons CSS:
- Clear browser cache and hard reload (Ctrl+Shift+R)
Development Tips
Next Steps
Architecture
Learn about the Angular standalone component architecture
Components
Explore the available components and how to use them
Services
Understand the service layer and data management
Building & Deployment
Build and deploy the application to production
Additional Resources
- Angular DevTools: Chrome Extension
- Angular CLI: Press
h + Enterin the terminal for dev server help - Keyboard Shortcuts:
r + Enter- Reload browsero + Enter- Open in default browserh + Enter- Show help