Get Started in Minutes
This guide will walk you through setting up the Service Orders Management System from installation to creating your first service order.Install Dependencies
First, clone the repository and install all required dependencies.The
postinstall script will automatically run nuxt prepare to set up your development environment.Ensure you have Node.js 16.x or higher installed on your system.
Configure API Endpoint
The application connects to a backend API for authentication and data management. Configure the API base URL in For production deployments, set the environment variable:
nuxt.config.ts:nuxt.config.ts
.env
Start Development Server
Launch the Nuxt development server with hot module replacement:The application will be available at
http://localhost:3000.The development server includes auto-import for components, composables, and Vue Router pages. No manual imports needed!
Authenticate
Navigate to
http://localhost:3000 to access the login page. The authentication system uses JWT tokens for session management.Login Flow:- Enter your email and password
- The system validates credentials with the backend API
- Upon successful login, a JWT token is stored in
localStorage - You’re redirected to the service orders dashboard at
/serviceorders
pages/index.vue
Create Your First Service Order
Once authenticated, you can create and manage service orders:
- Click the Nuevo (New) button on the service orders page
-
Fill in the service order details:
- Order number
- Service type (garantía, reparación, mantenimiento)
- Part number and serial number
- Description of the issue
- Company and contact information
- Equipment type
- Delivery conditions
- Save the order to persist it to the backend
useServiceOrders composable for state management:composables/useServiceOrders.ts
What’s Next?
Now that you have the Service Orders Management System running, explore these features:Service Orders
Learn how to create, edit, and track service orders
Companies & Contacts
Manage company information and contact details
Equipment Management
Track equipment with part numbers and serial numbers
API Integration
Understand how the frontend connects to the backend
Troubleshooting
API connection errors
API connection errors
If you’re getting connection errors:
- Verify your backend API is running
- Check the
apiBaseUrlinnuxt.config.tsmatches your backend URL - Ensure CORS is properly configured on your backend
- Check browser console for detailed error messages
Login fails with correct credentials
Login fails with correct credentials
Common issues:
- Backend API endpoint is incorrect
- Backend is not returning the expected response format (
{ access_token: "..." }) - Network connectivity issues between frontend and backend
- CORS blocking the request
Service orders not loading
Service orders not loading
If service orders don’t appear after login:
- Check that your JWT token is stored in
localStorage - Verify the token is being sent in the
Authorizationheader - Ensure the
/service-ordersendpoint is accessible - Check the browser console and network tab for errors
Additional Resources
Project Structure
Understand the Nuxt 3 application architecture
State Management
Learn about Pinia stores and composables