{"id":24835886,"url":"https://github.com/pochetes/portfolio-api","last_synced_at":"2026-04-17T06:32:07.883Z","repository":{"id":115066547,"uuid":"437344881","full_name":"Pochetes/portfolio-api","owner":"Pochetes","description":"The RESTful web service that powers the data in my portfolio website.","archived":false,"fork":false,"pushed_at":"2022-01-09T09:15:48.000Z","size":3215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T14:12:06.650Z","etag":null,"topics":["mongodb","python","rest-api"],"latest_commit_sha":null,"homepage":"https://robertos-api.herokuapp.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pochetes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-11T17:22:37.000Z","updated_at":"2022-01-09T09:15:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"1515b438-7381-4615-995e-f37328082d93","html_url":"https://github.com/Pochetes/portfolio-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pochetes/portfolio-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pochetes%2Fportfolio-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pochetes%2Fportfolio-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pochetes%2Fportfolio-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pochetes%2Fportfolio-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pochetes","download_url":"https://codeload.github.com/Pochetes/portfolio-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pochetes%2Fportfolio-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31918479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","python","rest-api"],"created_at":"2025-01-31T04:59:45.418Z","updated_at":"2026-04-17T06:32:07.875Z","avatar_url":"https://github.com/Pochetes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roberto's Portfolio API\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](LICENSE)\n![Code Size](https://img.shields.io/github/languages/code-size/Pochetes/portfolio-api?style=for-the-badge)\n![Website](https://img.shields.io/website?down_color=red\u0026down_message=offline\u0026style=for-the-badge\u0026up_color=green\u0026up_message=online\u0026url=https%3A%2F%2Frobertos-api.herokuapp.com%2Fdocs)\n![Open Issues](https://img.shields.io/github/issues-raw/Pochetes/portfolio-api?color=purple\u0026style=for-the-badge)\n![Closed Issues](https://img.shields.io/github/issues-closed-raw/Pochetes/portfolio-api?color=brown\u0026style=for-the-badge)\n![Lines of code](https://img.shields.io/tokei/lines/github/pochetes/portfolio-api?style=for-the-badge)\n\nThe Roberto's Portfolio API is meant to retrieve data about my college life, career experiences and more. The goal of this API is to provide a data source for my GraphQL backend to display information for my portfolio website.\n\n## Description\n\nThe api returns JSON responses in the `applications/json` format. It has a total of 6 endpoints that return specific data about me. More will be explained below.\n\n### File Structure\n```\n.\n├── Dockerfile\n├── LICENSE\n├── Pipfile\n├── Pipfile.lock\n├── Procfile\n├── README.md\n├── api-tests.json\n├── config.py\n├── docker-compose.yml\n├── endpoints\n│   ├── __init__.py\n│   ├── auth.py\n│   ├── contacts\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   ├── experiences\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   ├── interests\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   ├── projects\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   ├── skills\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   ├── user\n│   │   ├── README.md\n│   │   ├── __init__.py\n│   │   ├── models.py\n│   │   └── routers.py\n│   └── utils.py\n├── main.py\n├── media\n│   └── gifs\n│       ├── GETmethod.gif\n│       ├── POSTmethod.gif\n│       └── Params.gif\n├── requirements.txt\n└── script.sh\n\n10 directories, 47 files\n```\n\n### Technologies Used\n\nThe API is implemented in:\n- the **Python** language, using a framework known as **FastAPI**, which automatically renders a **Swagger** Documentation Spec.\n- **MongoDB**, the NoSQL database, in order to store all my data. Currently under the Python driver, **Pymongo**.\n- **Uvicorn**, a server implementation, that enables an ecosystem of Python web frameworks such as the one I'm currently using.\n- **Pydantic**, a data validation and settings management tool that helps define my models and schema more efficiently.\n\n## Features\n\nThis API provides many features that make it lighting-fast:\n- CORS Middleware\n- lru_cache Decorator\n- Easy-To-Use Documentation\n- Modularized Application\n- MongoDB CRUD Operations\n- Error \u0026 Exception Handling\n- Pylint \u0026 API Testing\n- Auth0 Authentication \u0026 Security\n- Built under Docker environment OS\n- Deployed On Heroku\n\n## Endpoints\n\nThe base URL is currently: `https://robertos-api.herokuapp.com`\n\n### User 👨🏼\n\nYou will be able to see my:\n\n- name.\n- email.\n- brief description.\n\nSee a detailed description at: [User Docs](endpoints/user/README.md)\n\n### Contacts 📲\nHere will be my **social media** links.\n\nSee a detailed description at: [Contacts Docs](endpoints/contacts/README.md)\n\n### Skills 🌟\nThis section holds the **technical** skills that I possess.\n\nSee a detailed description at: [Skills Docs](endpoints/skills/README.md)\n\n### Experiences 📈\nHere will be the experiences that I've had throughout my journey pursuing **Software Engineering**.\n\nSee a detailed description at: [Experiences Docs](endpoints/experiences/README.md)\n\n### Interests 🤔\nThis will retrieve my interests **in** and **outside** the technology world.\n\nSee a detailed description at: [Interests Docs](endpoints/interests/README.md)\n\n### Projects 💡\nThis will return my software related projects that I have worked on.\n\nSee a detailed description at: [Projects Docs](endpoints/projects/README.md)\n\n## Documentation\n\nThanks to FastAPI, a documentation page is automatically rendered for us. This follows the OpenAPI Spec rules.\n\nTo see the docs, go to [docs](https://robertos-api.herokuapp.com) when it's deployed.\n\n***Update**: The `/docs` endpoint will automatically be accessed when using the base url.\n\n### Using a `GET` method\n\nThe `GET` method allows you to access all the data from a specific resource. It is done, like so:\n\n![GET method](media/gifs/GETmethod.gif)\n\n### Using a `POST` method\n\nThe `POST` method allows you to create a new data entry for a specific resource. There will be a Request body in which you will fill out all contents needed, like so:\n\n![POST method](media/gifs/POSTmethod.gif)\n\n### Using a method that has a path parameter\n\nA method that has a path parameter usually requires some sort of input to find, update, delete a specific resource. In this example, we are finding a single project by an `id` path parameter. To do this, copy the parameter from the first `GET` method and use it as the current path parameter, like so:\n\n![Params](media/gifs/Params.gif)\n\n## Authentication\n\nThe `POST`, `PUT`, and `DELETE` endpoints are protected using 0Auth authentication. I am the only person that's able to make those changes (unless you were able to get my access token, that is) and authenticate the endpoints. It is secured through a JWT-formatted access token. After some time, a new token is generated, making it difficult for hackers to access these data points. The hashing algorithm used is **RS256**, or RSA Signature with SHA-256.\n\n## Configuration\n\nTo run this project, you need a couple things:\n\n- MongoDB connection\n- Virtual environment\n- Installed Dependencies\n\n### Get Project\n\nYou can clone this project using the following command:\n\nUsing HTTPS (I believe it's deprecated)\n```\ngit clone https://github.com/Pochetes/portfolio-api.git\n```\n\nUsing SSH\n```\ngit clone git@github.com:Pochetes/portfolio-api.git\n```\n\n### Database Connection\n\nTo get a MongoDB database, sign in (or create an account if you haven't already) to MongoDB Atlas. Then, create a new cluster and find the connection string in which you will put in a `.env` file, like so:\n\n```python\n# Unix:\nexport MONGODB_URI = \"mongodb+srv://Username:Password@mongodb-cluster-name.foihs.mongodb.net/db-name?retryWrites=true\u0026w=majority\"\n```\n\nFor more details, visit [connect to a MongoDB database](https://docs.atlas.mongodb.com/).\n\n### Creating a virtual environment\nMy application currently uses Pipenv to manage dependencies and environments, but you can also use pip + virtualenv.\n\nTo create a virtual environment, create a hidden `virtualenv` file, like so:\n```\npython3 -m venv name-of-env\n```\nThen, activate it, like so:\n```\nsource name-of-env/bin/activate\n```\n\n### Installing Dependencies\n\nTo install, run the command:\n```\npython3 -m pip install -r requirements.txt\n```\n\n### Running the Server\n\nTo run the server, run:\n```\npython main.py\n```\n\n### Creating a Docker Container\n\nFirst, build the docker image as provided in the `Dockerfile` using this command:\n```\ndocker build -t portfolio-api-image .\n```\nAfterwards, make a new container using the `docker run` command:\n```\ndocker run -d \\\n--name portfolio-api-container \\\n-p 8080:8080 \\\n\u003cdocker_image_id\u003e\n```\nNow you will be able to access the containerized application on your local machine!\n\n## License\n\nThis repo is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpochetes%2Fportfolio-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpochetes%2Fportfolio-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpochetes%2Fportfolio-api/lists"}