Session-Based Authentication
Authorization: Bearer <token>,Authentication-Token:<token>) for every request.Advantages of token based authentication:
Session-Based Authentication
Authorization: Bearer <token>,Authentication-Token:<token>) for every request.AdminStats.jsAllRequests.jsAllServices.jsAvailableServices.jsClosedServices.jsCustomerRegister.jsEditRequest.jsEditService.jsHome.jsLogin.jsMyRequests.jsMyServices.jsNavBar.jsProfessionalRegister.jsProfessionals.jsProfile.jsSearchResult.jsThe Partials subdirectory may contain smaller, reusable components shared across multiple pages.
Customer Role:
Components like CustomerRegister.js, MyRequests.js, and SearchResult.js are tailored for customers to manage their service interactions.
Service Professional Role:
Components like ProfessionalRegister.js, MyServices.js, and Professionals.js are designed for professionals to manage their services and requests.
Admin Role:
Admins use components like AdminStats.js, AllRequests.js, and ClosedServices.js to oversee the system.
Questions related to backend jobs
1. SMTP (Simple Mail Transfer Protocol)?
SMTP is a communication protocol used to send emails over the Internet. It works by transferring email messages between mail servers or from a client (e.g., your email application) to a mail server.
SMTP operates on the Application Layer and uses a store-and-forward mechanism
MailHog is a free email testing tool that acts as a fake SMTP server for testing emails locally. It's especially useful during development to test email functionality without sending real emails.
Component Basics: Explanation of any one of the vue.js component ?
export default {}
This exports the Vue component definition as the default export, making it reusable in other parts of the application
name: "MyServices",
The component's name is MyServices, helpful for debugging tools and readability.
data() { return { myServices: [] }; }
data(): A function returning the reactive state of the component.myServices: An array initialized as empty, meant to store a list of service requests fetched from the API.methods: {}How are you rendering the charts in your app?
To generate statistical visualizations and metrics for an admin using Matplotlib and Flask. It combines Flask routes and SQLAlchemy queries to retrieve data from the database, processes it, and uses Matplotlib to create charts. The charts are converted into Base64 strings to be sent to the frontend for rendering.
Base64:
Matplotlib:
BytesIO:
Matplotlib Features:
plt.bar: Creates the bar chart.plt.text: Adds labels above each bar.This chart shows the number of requests for each service.
plt.bar: Creates the bar chart with service names as keys and request counts as values.buffer1 = BytesIO(): Creates an in-memory buffer to store the chart as an image.plt.savefig(buffer1, format='png'): Saves the chart in PNG format to the buffer.base64.b64encode(buffer1.getvalue()).decode(): Encodes the chart as a Base64 string for frontend use.buffer = BytesIO()
plt.savefig(buffer, format='png', bbox_inches='tight')
buffer.seek(0)
base64.b64encode(buffer.getvalue()).decode()
What are Vue life cycles ? Which all you used?
In Vue.js, lifecycle hooks are functions that allow developers to run code at specific stages of a Vue component's lifecycle. These hooks provide control over how the component is initialized, updated, or destroyed.
Below is a categorized list of hooks with their purpose:
beforeCreate():
created():
beforeMount():
mounted():
beforeUpdate():
updated():
beforeUnmount() (formerly beforeDestroy in Vue 2):
unmounted() (formerly destroyed in Vue 2):
created() for fetching data.mounted() for DOM-related tasks.beforeUnmount() for cleanup operations.Explain the significance of fs_uniquifier in your project (if applicable)?
fs_uniquifier is typically used for generating unique identifiers for resources
fs_uniquifier is stored as part of the user record in the database, revoking a token simply involves changing its value.fs_uniquifier.fs_uniquifier is Usefulfs_uniquifier during a password reset invalidates any prior reset or login tokens.fs_uniquifier revokes all active tokens for the account.fs_uniquifier ensures no token tied to the old email or user account remains valid.fs_uniquifier adds an essential layer of security to ensure that tokens are managed effectively.Mangerial Economics Quiz1 solutions Guide solutions watch on you tube channel