This repository contains the solutions for the EBUDDY PTE. LTD. technical test, which involves setting up both backend and frontend applications, integrating Firebase, implementing RESTful endpoints, and creating a monorepo using Turborepo. It also includes answers to personality and technical questions.
- Part 1: Backend Setup
- Part 2: Frontend Setup
- Part 3: Monorepo Setup via Turborepo
- Part 4: Personality & Technical Questions
- Installation Instructions
backend-repo/
├── config/
│ └── firebaseConfig.ts
├── controller/
│ └── api.ts
├── core/
│ └── app.ts
├── entities/
│ └── user.ts
├── middleware/
│ └── authMiddleware.ts
├── repository/
│ └── userCollection.ts
├── routes/
│ └── userRoutes.ts
└── package.json
- Endpoint
update-user-data
: Updates Firestore data in theUSERS
collection. - Endpoint
fetch-user-data
: Fetches Firestore data from theUSERS
collection. - Middleware:
authMiddleware.ts
validates the request token.
frontend-repo/
├── src/
│ ├── apis/
│ │ └── userApi.ts
│ ├── app/
│ │ ├── fonts/
│ │ ├── login/
│ │ │ └── page.tsx
│ │ ├── main/
│ │ │ └── page.tsx
│ │ ├── signup/
│ │ └── page.tsx
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── components/
│ │ ├── LoginForm.tsx
│ │ ├── ProtectedRoute.tsx
│ │ ├── SignUp.tsx
│ │ └── UpdateButton.tsx
│ ├── context/
│ │ └── AuthProvider.tsx
│ ├── firebase/
│ │ └── firebase.ts
│ ├── store/
│ │ ├── actions.ts
│ │ ├── reducers.ts
│ │ └── store.ts
│ ├── theme/
│ │ └── index.ts
│ └── providers.tsx
└── package.json
- Firebase Authentication: Implemented for login and creating a basic Logic Form.
- Mobile-Responsive Logic Form: Using React MUI to ensure mobile responsiveness.
- State Management: Using Redux to manage the state of the update process, including loading, success, and error messages.
- API Integration: Fetch user information with a button and display the state using
Typography
. - Testing Locally: Can test the API locally using the Firebase Emulator.
Identify common logic between the frontend and backend repositories and combine them into a monorepo using Turborepo.
technical-test/
├── apps/
│ ├── frontend-repo/
│ └── backend-repo/
├── packages/
│ └── shared/
│ ├── types/
│ │ └── user.ts (common shared type definitions)
│ └── utils/
│ └── userValidation.ts (common validation logic)
├── package.json
└── turbo.json
user.ts
(inpackages/shared/types/
): Contains theUser
type definition to ensure consistent data structures across both frontend and backend.userValidation.ts
(inpackages/shared/utils/
): Includes thevalidateUser
function to validateUser
objects consistently across frontend and backend.
The turbo.json
file is set up to manage dependencies and tasks across the monorepo efficiently. It allows for parallel builds and shared caching.
- Frontend: The shared
User
type and validation logic are used in components likeUpdateButton.tsx
to validate user input. - Backend: The shared logic is utilized in
controller/api.ts
to validate incoming requests before processing.
1. What are the most difficult technical problems in your work experience you have encountered and how do you fix them?
The most difficult technical problems I have faced involve issues with scalability and performance optimization. For example, optimizing the backend performance when handling large datasets in real-time applications can become challenging. I typically approach these issues by first analyzing the problem through profiling tools, identifying bottlenecks, and then applying caching techniques or refactoring the code to optimize algorithm performance. Additionally, for distributed systems, I focus on improving concurrency and load balancing to handle high traffic.
I follow an iterative approach to project development. Initially, I break down the project into smaller tasks, ensuring I understand the requirements fully. I start by setting up the project structure and ensuring that I have a clean development environment. I then implement the core features, followed by testing and integration. Throughout the development process, I continuously ensure proper documentation and keep my team updated. Finally, after deployment, I monitor the project and make necessary adjustments based on user feedback.
When learning a new topic, I start by understanding the fundamentals and building a solid theoretical foundation. I prefer hands-on learning, so I look for projects or exercises that allow me to apply what I’m learning. Additionally, I engage with community resources, such as blogs, forums, and online courses, to gain different perspectives. I also prioritize consistency, dedicating time daily to learn and practice, rather than cramming.
I value consistency over "fast & efficient". While efficiency is important, I believe that consistency leads to long-term success and mastery in any field. Consistent effort and practice allow for steady improvement, better understanding, and a deeper grasp of concepts.
Yes, I own a MacBook. I prefer using it for development due to its smooth performance and compatibility with various development tools, especially when working on frontend and mobile applications.
I am available to start work immediately, as I am currently in a position where I can focus full-time on new opportunities.
git clone https://github.com/your-username/technical-test.git
cd technical-test
From the root directory, install all the dependencies for the monorepo:
npm install
Navigate to the frontend app directory:
cd apps/frontend-repo
Install frontend dependencies:
npm install
Navigate to the backend app directory:
cd apps/backend-repo
Install backend dependencies:
npm install
In the backend directory, start the Firebase emulator:
firebase emulators:start --only functions
Back in the frontend directory, start the frontend app:
npm run dev
Visit http://localhost:3000
to see the frontend app in action.
This repository includes the solution to the EBUDDY PTE. LTD. technical test, where I implemented a backend API with Express.js, integrated Firebase for authentication and Firestore, developed a frontend using Next.js, and combined both into a monorepo using Turborepo. Additionally, I answered some personality and technical questions as part of the assessment process.
Feel free to explore the repository, and I look forward to further discussions on this!