Giter Site home page Giter Site logo

longnd / elixir-gscraper Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.12 MB

Simple Google Search scraper built on Elixir

Home Page: https://elixir-gscraper-staging.herokuapp.com/

License: MIT License

Elixir 82.51% SCSS 6.93% JavaScript 4.05% HTML 5.26% Dockerfile 1.10% Makefile 0.07% Shell 0.07%
elixir erlang heroku phoenix

elixir-gscraper's People

Contributors

dependabot[bot] avatar longnd avatar

Watchers

 avatar  avatar  avatar

elixir-gscraper's Issues

[FRONTEND] As a user, I can sign-out

Why

Create a Sign out UI to enable the users to sign out from the website.

Acceptance Criteria

Create a Sign out menu or button which the user can access on any pages to sign out.

[FRONTEND] As a user, I can sign-in using my email and password

Why

The users must sign-in before doing any actions the app can provide. They can do that by providing the credential through a Login form.

Acceptance Criteria

Create a login page with the following information:

  • Page title: Sign In
  • A login form:
    • Title: Sign In
    • Fields:
      • Email: required
      • Password: requried
      • A "Sign In" button to submit the form
  • A link with the title "Sign up" to redirect the user to the Sign Up page.
  • In case of invalid inputs, e.g. invalid email format, password doesn't match the required complexity or the credential isn't correct, the error message must be reported to the user.

[FRONTEND] As a user, I can see my uploaded keywords

Why

After successfully upload a CSV file, the user must be able to see the list of properly parsed terms to check what they uploaded.

Acceptance Criteria

Show the list of uploaded keywords to the user after they submit the file.

Learn Elixir & Phoenix

Why

It's essential to learn Elixir & Phoenix framework to understand their syntax and features before working on the project.

Acceptance Criteria

Complete some following courses & material:

The taste of Elixir

Elixir - Basic

Phoenix

Elixir - Advanced

Useful resources (Optional)

Ecto

Testing tools

Podcast (Optional)

Visual Studio Code extension (Optional)

Setup CI/CD

Why

It's essential that a proper project setup should be done before working on any feature implementation.

Acceptance Criteria

  • Setup Heroku App
  • Setup Github actions CI for pull requests
  • Setup Github actions CD for deployment
  • Update the Readme file with proper setup instructions

[BACKEND] As a user, I can sign-up using my email and password

Why

Handle the submitted information by the user to create an account.

Acceptance Criteria

  • Invalid inputs must be reported back to the user.
  • Create an account with the provided information.
  • Redirect the user to the home page with a message to confirm the account's successful creation: "Thank you for your registration! Your account is now ready to use."

[FRONTEND] As a user, I can upload a CSV file of keywords

Why

There must be a section on the website where the user can upload a CSV file of keywords.

Acceptance Criteria

Create a page on the website with a form to upload the CSV file of keywords:

  • Page title: CSV Upload
  • A form that:
    • Allow the user to select the CSV file to upload.
    • The form must have some text to indicate the CSV format it supports: both column and inline formats.
    • An "Upload" button to submit the file.
  • The page must be able to report the errors to the users if it arises, e.g. invalid CSV format or invalid file type.

[BACKEND] As a user, I can see the search result statistics of each keyword

Why

For each of the CSV files the users uploaded, they can see the search result statistics of each keyword parsed from the file.

Acceptance Criteria

Depends on the chosen uploaded CSV, return the following information for each keyword:

  • Number of AdWords advertisers in the top position
  • Total number of AdWords advertisers on the page
  • URLs of the AdWords advertisers in the top position
  • Number of the non-AdWords results on the page
  • Total number of links (all of them) on the page
  • HTML code of the page/cache of the page.

The results must be sorted by keyword

[Backend] Process the keyword searching

Why

After the keyword file is uploaded and the terms are parsed, implement the searching for each keyword and extract the search results to save to DB.

Acceptance Criteria

  • The search for each keyword must start to run as soon as they are parsed and save to DB.
  • If the search fails to process, retry it after a certain time.
  • Extract the following information from the search result and save in the DB:
    • Number of AdWords advertisers in the top position
    • Total number of AdWords advertisers on the page
    • URLs of the AdWords advertisers in the top position
    • Number of the non-AdWords results on the page
    • Total number of links (all of them) on the page
    • HTML code of the page/cache of the page.

[API] As a user, I can upload a CSV file of keyword via a Restful API

Why

Create an API that a user can use to upload a CSV file.

Acceptance Criteria

The API must meet the following conditions:

  • JSON API standard must be followed
  • Only authenticated users can upload the files.
  • Only accept the CSV file type.
  • Only accept the files that have 1-1000 keywords.
  • Accepts both column and inline CSV format.
  • Reports back the errors to the user if it arises, e.g. invalid file type or invalid number of keyword
  • Stores the uploaded keywords in the database.
  • Triggers the search process for each of the keywords.

[FRONTEND] As a user, I can sign-up using my email and password

Why

Create a page with a form to allow the user to sign up using an email and password.

Acceptance Criteria

Create a page with the following information:

  • Page title: Registration
  • Registration form:
    • Title: Create your account
    • Fields:
      • email: required
      • password: required
      • confirmed password: required
    • A "Sign Up" button to submit the form.
    • Error messages: each field should be able to show the error message in case of invalid input.
  • A link with the title "Already had an account? Sign in" to redirect the user to the login form if they already had an account.

[BACKEND] As a user, I can sign-in using my email and password

Why

Validate the submitted credential to login the user or report back the errors if it arises.

Acceptance Criteria

  • Report back the errors to the user if it arises, e.g. invalid email, password doesn't match the complexity required or the credential doesn't work...
  • If the credential is correct, login the user and redirect to the homepage.

[FRONTEND] As a user, I can search for a keyword

Why

Update the report page, created in #15 to allow the user to search for a keyword.

Acceptance Criteria

Update the report page to add a search field to allow the user to input a term to search for a keyword.

[BACKEND] As a user, I can see my uploaded keywords

Why

After handling the uploaded keyword in #10, rendering those keywords to the users so they can verify the upload.

Acceptance Criteria

  • Render the properly parsed terms from the uploaded CSV file to the users so they can check what they uploaded.
  • The keywords must be sorted alphabetically

[FRONTEND] As a user, I can see the pagination of the report

Why

As the number of keywords in each report could be huge (up to 1000 keywords), they should be paginated for a friendly user experience.

Acceptance Criteria

Update the report page created in #15 to add a pagination section that allows the user to navigate between pages.

[API] As a user, I can get a list of keywords along with search result statistics via a Restful API

Why

The users can upload CSV files multiple times. Each file can contain many keywords. Each upload is kept on track with an upload ID.
Create a Restful API to allow the user to get a list of keywords based on the upload ID along with the search result statistic. It means the API should return parsed terms from a CSV file along with the search statistic for each term.

Acceptance Criteria

The API must meet the following conditions:

  • JSON API standard must be followed
  • Only authenticated user can consume the API
  • Accept an upload ID
  • Return keywords belong to that upload
  • Paginate the result
  • Each keyword must come with the following search results statistic:
    • Number of AdWords advertisers in the top position
    • Total number of AdWords advertisers on the page
    • URLs of the AdWords advertisers in the top position
    • Number of the non-AdWords results on the page
    • Total number of links (all of them) on the page
    • HTML code of the page/cache of the page.

[BACKEND] As a user, I can see the pagination of the report

Why

Paginate the data on the report page (created in #15) so it doesn't show all of the keywords and their statistic on one page.

Acceptance Criteria

  • Paginate the results displayed on the report page
  • The number of items per page should be configurable

[FRONTEND] As a user, I can see the search result statistics of each keyword

Why

Display the search result statistic for each keyword parsed from the uploaded CSV file to the user.

Acceptance Criteria

Create a report page to display the list of keywords parsed from each of the CSV files they uploaded. Each keyword must show the following search result statistics:

  • Number of AdWords advertisers in the top position
  • Total number of AdWords advertisers on the page
  • URLs of the AdWords advertisers in the top position
  • Number of the non-AdWords results on the page
  • Total number of links (all of them) on the page
  • HTML code of the page/cache of the page.

[BACKEND] As a user, I can upload a CSV file of keywords

Why

Handle the upload of CSV files by the users.

Acceptance Criteria

  • Only authenticated users can upload the files.
  • Only accept the CSV file type.
  • Only accept the files that have 1-1000 keywords.
  • Accept both column and inline CSV format.
  • Report back the errors to the user if it arises, e.g. invalid file type or invalid number of keyword
  • Store the uploaded keywords in the database.

[API] As a user, I can search for a keyword via a Restful API

Why

Create an API to let the user search for a keyword, base on a query parameter.

Acceptance Criteria

  • JSON API standard must be followed
  • Only authenticated user can consume the API
  • The API must accept a query parameter and filter for keywords based on that filter.

[BACKEND] As a user, I can sign-out

Why

Sign out the users from the website when receiving the sign-out request submitted from the clients.

Acceptance Criteria

  • Sign out the users from the website when they click on the Logout menu/button.
  • Redirect the users to the Sign-in page.

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.