GithubHelp home page GithubHelp logo

sero-dev / job-hunt Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 116 KB

A .NET microservice for querying and saving the user's job applications in MongoDB. The type of applications applies to Software Engineer/Developer positions.

License: Apache License 2.0

C# 97.60% Dockerfile 2.40%
microservice csharp mediatr cqrs-pattern repository-pattern unit-of-work-pattern rest-api dotnet job-hunt docker mongodb automapper

job-hunt's Introduction

Home

Home is an all-in-one software solution that allows users to customize their home panel to tackle specific home chores effectively! Every widget is a self-contained assistant for tackling a very particular chore/task. This design makes it very easy to break up each widget as a microservice. The idea is not ground-breaking, it's not the next biggest thing, but it's an opportunity to build a platform that scales with developers that love to build useful tools for people, even when they already exist.

Job Hunt

The first of many microservices is JobHunt, a .NET microservice for querying and saving the user's job applications in MongoDB. At the moment, the type of applications applies to mostly Software Engineer/Developer positions. Home allows the open-source community to add their own microservices using whatever technologies they feel are most beneficial for the task.

Running Locally

Read through the wiki page on Setting Up Local Development

job-hunt's People

Contributors

sero-dev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

b13peterson

job-hunt's Issues

Create an endpoint for deleting an existing job application

Create an endpoint for deleting an existing job application using the id of the job application.

Be sure to follow the CQRS design pattern that is already being utilized in the project. You need to implement the delete method in the Persistence layer in the Repository.cs file to remove the record from DynamoDb.

The endpoint should take the id as part of the route with the DELETE HTTP method.

If the deletion is successful, return an Ok.
If the job application with the supplied id cannot be found, return a Not Found.

The endpoint should return a status code with no other information.

  • Create an endpoint that will receive an id in the route with a DELETE HTTP method
  • Create a command for checking if the application exists and executing the deletion from the database
  • Create a repository method for deleting a record in the database (you will need to update the IRepository.cs file as well)

Bonus points if you can write tests to cover the new code you are adding. For full coverage, you may need to write a variety of unit tests, API tests, and integration tests.

Create Integration Tests for Repository classes

Create Integration Tests for testing the Repository classes to prevent application-breaking changes in the future.

  • Figure out how to perform an integration test
  • Create tests for ensuring proper interactions with the database are occurring

Create DTOs for API Layer

Create Data Transfer Objects for incoming requests/outgoing responses to decouple the entities from the API allowing each endpoint to control the structure/data the consumer will receive.

The DTOs will need to be mapped from and to the Domain objects. It would be viable to use a mapper library like AutoMapper or Mapster.

DTOs should be contained in a folder called DTOs
Mapping logic should be contained in a folder called Mappings.
These folders should be inside the Application Layer.

  • Select a mapping library
  • Create DTO objects based on API's complex requests and responses
  • Create Mappings for DTOs from/to Entity objects
  • Create Unit Tests for the Mapping Logic

Add DynamoDB Setup Info for Local Development

Create the Setting up Local Development Wiki Page with information to set up a local development environment.

Docker Command:
docker run -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -inMemory -sharedDb

Jobs Table Creation Command:
aws dynamodb create-table --table-name Jobs --endpoint-url http://localhost:8000 --attribute-definitions AttributeName=Id,AttributeType=S --key-schema AttributeName=Id,KeyType=HASH --billing-mode PAY_PER_REQUEST

  • Create Wiki page dedicated to setting up a local development environment
  • Add docker command for creating a local instance of DynamoDB
  • Add AWS command for creating the job application

Create API Tests for Endpoints

Create API Tests for testing the endpoints to prevent application-breaking changes in the future.

  • Figure out how to perform an integration test
  • Create tests for ensuring proper interactions with the application is occurring

Add Logging to JobHunt

Add logging to the entire application to allow for production debugging, monitoring, and data collection. Logging should be able to be collected as part of the entire ecosystem.

  • Figure out how to log effectively in a .NET Web API
  • Figure out how to log inside a microservice architecture
  • Add logging to JobHunt microservice

Create a Wiki Page of Code Standards

Create a Wiki Page discussing the Code Standards for this project.

Some of the topics to discuss are:

  • Request/Response objects are used for the APIs strictly
  • Endpoint Design
  • New code is accompanied with testing

Fill in information about the Project Structure

There is a wiki page created for discussing the Project Structure.

Some of the points that should be discussed are:

  • The architecture
    • API Layer
    • Application Layer
    • Domain Layer
    • Persistence Layer
  • Mongo Driver
  • MediatR/CQRS

Add validation for adding a new Job

Add validation for adding a new Job to the database. Validate whether the request object is valid.

A job can be saved in the database if it fulfills the following criteria:

  • Job Title is not empty
  • Employer is not empty
  • City is not empty
  • State is not empty and a valid US State
  • Status is not empty and is one of the following:
    • Applied
    • Rejected
    • Declined
    • Accepted
    • Offered
    • Code Challenge
    • Interview
    • Messed Up
    • Phone Call
    • Under Review
  • Amenities is not null

If DateSubmitted is null, the date will be set to Now.
If DateUpdated is null, the date will be set to DateSubmitted.

  • Learn how to use FluentValidation
  • Add Validation to Command/Query classes as a pre-action
  • Create unit tests for testing validation rules

Create an endpoint for updating an existing job application

Create an endpoint in the JobController to update a job application using its ID.

Be sure to follow the CQRS pattern that is in place, keeping the API call down to a few lines of code with the bulk being inside the Application layer.

You will need to also implement the Update function in the Persistence layer inside the Repository.cs file.

The endpoint should receive the id of the job application as part of the route, with the new object to update inside the body.

If the object is saved successfully, return an Ok
If the id cannot be found, return a NotFound
If the object is invalid, return a UnprocessableEntity

The endpoint should return a status code with no other information.

  • Create an endpoint that will receive an id in the route, and the update job request in the body
  • Create a command for validating and transforming the request into a proper object to be saved in the database
  • Create a repository method for updating a record in the database (you will need to update the IRepository.cs file as well)

Bonus points if you can write tests to cover the new code you are adding. For full coverage, you may need to write a variety of unit tests, API tests, and integration tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.