Skip to main content

Get up and running

This guide will walk you through accessing CEMAC and navigating to your dashboard to view your inventory and sales data.
1

Access the login page

Navigate to your CEMAC instance. You’ll see the login page for administrators.
CEMAC has separate login pages for administrators and employees. Make sure you’re using the correct login page for your role.
If you’re an employee, use the employee login page at /views/employee-login.html.
2

Sign in to your account

Enter your credentials and click Ingresar to log in.
// CEMAC uses Firebase Authentication
// Authentication is handled by the AuthService
const result = await window.authService.login(email, password);
Administrator accounts can only log in through the admin login page. Employee accounts attempting to access the admin panel will be rejected with a permission error.
After successful authentication, you’ll be redirected to the dashboard at /views/dashboard/inicio.html.
3

Explore your dashboard

Once logged in, you’ll see the main dashboard with:
  • Today’s sales summary - Real-time sales metrics and revenue
  • Quick stats cards - Key performance indicators at a glance
  • Recent activity - Latest transactions and inventory changes
  • Alerts panel - Low stock warnings and important notifications
The dashboard automatically loads your business data:
// Dashboard initializes and checks authentication
class DashboardHandler {
  async init() {
    if (!this.checkAuthentication()) {
      return;
    }
    this.loadUserInfo();
    this.applyRoleBasedPermissions();
  }
}
4

View your inventory

Navigate to Inventario from the sidebar to see your product catalog.The inventory view provides:
  • Search and filters - Find products by name, category, brand, or supplier
  • Stock levels - Current availability status for each product
  • Product details - Prices, categories, and supplier information
  • Quick actions - Add, edit, or remove products
// Inventory loads with pagination and filters
this.currentFilters = {
  page: 1,
  limit: 10,
  search: "",
  category: "",
  brand: "",
  supplier: "",
  availability: "", // limited, unlimited, out-of-stock
  sortBy: "name",
  sortOrder: "asc"
};
Use the search bar at the top to quickly find products. Search supports real-time filtering with debouncing for optimal performance.
5

Check your alerts

Click on Alertas in the sidebar to view important notifications.CEMAC automatically generates alerts for:
  • Low stock - Products running low on inventory
  • Out of stock - Products that need immediate restocking
  • Custom alerts - Business-specific notifications you configure
// Alerts are loaded with filters and pagination
this.currentFilters = {
  startDate: "",
  endDate: "",
  priority: "",
  status: "",
  sort: "date",
  sortOrder: "desc",
  page: 1,
  limit: 10
};
Alerts refresh automatically every few minutes to keep you informed of critical inventory levels.

Next steps

Now that you’re familiar with the basics, explore more features:

Record your first sale

Learn how to process transactions and manage customer records.

Add products to inventory

Add new products, update stock levels, and organize your catalog.

Set up alerts

Configure automatic notifications for your business needs.

View analytics

Analyze sales trends and business performance with interactive charts.

Role-based access

CEMAC provides different capabilities based on your role:

Administrator access

Administrators have full access to:
  • All inventory management features
  • Sales recording and history
  • User management
  • Analytics and reports
  • System settings and configuration

Employee access

Employees can:
  • View inventory and product information
  • Record sales transactions
  • View alerts and notifications
  • Access basic analytics
Some features are restricted to administrators only. Elements marked with data-admin-only="true" will be hidden for employee accounts.

Authentication flow

Here’s how CEMAC handles authentication:
// 1. User submits login credentials
const result = await window.authService.login(email, password);

// 2. API validates credentials and returns token
if (result.success) {
  // 3. Check user role
  if (result.user.role !== 'admin') {
    // Reject non-admin users on admin login
    this.showError('Esta cuenta no tiene permisos de administrador');
    return;
  }
  
  // 4. Verify account is active
  if (result.user.isActive === false) {
    this.showError('Tu cuenta está desactivada');
    return;
  }
  
  // 5. Store token and redirect
  localStorage.setItem('authToken', result.token);
  window.location.href = '/views/dashboard/inicio.html';
}

Need help?

API Reference

Explore the complete API documentation for developers.

Build docs developers (and LLMs) love