Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Me-API Playground (Backend Assessment - Track A)

Live URLs


Overview

This project is a minimal backend and frontend playground that stores my candidate profile in a database and exposes it via a REST API. It demonstrates backend fundamentals such as API design, database modeling, query filtering, and frontend consumption.


Tech Stack

  • Backend: FastAPI (Python)
  • Database: SQLite (via SQLAlchemy ORM)
  • Frontend: Plain HTML + JavaScript (Fetch API)
  • Hosting: Render (Backend), Static HTML (Frontend)

Architecture Overview

  • The frontend consumes the backend via REST APIs.
  • The backend handles validation, filtering, and database access.
  • SQLite is used for simplicity and reproducibility.

Database Schema

The database consists of two main tables:

profile

Stores basic candidate information.

CREATE TABLE profile (
    id INTEGER PRIMARY KEY,
    name TEXT,
    email TEXT,
    education TEXT,
    github TEXT,
    linkedin TEXT,
    portfolio TEXT
);

projects

Stores project details.

CREATE TABLE projects (
    id INTEGER PRIMARY KEY,
    title TEXT,
    description TEXT,
    skills TEXT,
    link TEXT
);

Note: Project skills are stored as a comma-separated string for simplicity. This is a conscious trade-off to reduce schema complexity within the assessment scope.


API Endpoints

Health Check

GET /health

Returns 200 OK if the service is live.

Profile

GET /profile

Fetches or updates the candidate profile.

Projects

GET /projects
GET /projects?skill=python

Returns all projects or filters projects by skill.

Search

GET /search?q=keyword

Performs a simple substring search across project title, description, and skills.

Top Skills

GET /skills/top

Returns skills ranked by frequency across projects.


Frontend

The frontend is a minimal HTML page that:

  • Displays the candidate profile
  • Lists projects
  • Allows filtering projects by skill

It communicates with the backend using the Fetch API and demonstrates CORS-enabled API consumption.


Local Setup

  1. Clone the repository
git clone <repo-url>
cd me-api-playground
  1. Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
source venv/bin/activate  # macOS/Linux
  1. Install dependencies
pip install -r requirements.txt
  1. Seed the database
python -m app.seed
  1. Run the backend
uvicorn app.main:app --reload

Open:

API docs: http://127.0.0.1:8000/docs

Frontend: Open frontend/index.html in browser


Deployment

  • Backend is deployed on Render.
  • Frontend is a static HTML page that consumes the hosted API.
  • Environment variables are used for configuration in production.
  • The application automatically seeds initial data on startup if the database is empty. This ensures compatibility with free-tier hosting environments.

Sample API Calls

curl /health
curl /projects?skill=python
curl /search?q=api

Known Limitations & Trade-offs

  • SQLite is used instead of PostgreSQL for faster setup and reproducibility.
  • Skills are stored as comma-separated values rather than a normalized join table.
  • No authentication is implemented for write operations.
  • Search uses basic substring matching (no full-text search).
  • Frontend is intentionally minimal and unstyled.
  • These decisions were made to keep the scope small while maintaining a production-minded structure.

Remarks

  • If extended further, this project could include:
  • Authentication for write operations
  • Pagination for project listing
  • Proper skill normalization
  • Full-text search
  • CI/CD and automated tests

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages