Git Product home page Git Product logo

s-newman / skitter Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 18.2 MB

A Microblogging As A Service platform built on a microservice-based backend. Please don't look at this, it's not great code.

Python 31.92% CSS 2.07% HTML 9.27% Java 16.53% JavaScript 18.04% Shell 0.99% PHP 1.35% Ruby 19.83%
web-application microblogging microservice skitter nodejs angularjs flask php ruby-on-rails rest-api school-project satire twitter-clone

skitter's Introduction

skitter

A Microblogging As A Service (MAAS) platform built on a webscale microservice-based backend.

Frontmatter

What is Microblogging As A Service?

MAAS, or Microblogging As A Service, is the hottest new trend in the blogosphere! Want to run your own blog, but freaked out about all those Wordpress vulnerabilities? Like to share your thoughts, but too lazy busy too write a full-length blogpost? Well have we got the solution for you!

Skitter's innovative MAAS platform allows you to share your thoughts will all of your (RIT account-holding) friends and followers! Just tap together a quick 140-character response, forget any geopolitical consequences that may arise from what you just composed, and hit that "skit" button!

How do you make money?

Monetization is not a priority right now. Our mission statement involves pushing out an MVP in two months and then getting bought out by one of the Big Names in tech. It worked for so many other startups, so why not us?

We promise not to collect any data on you to sell to advertisers. Probably. Maybe. Depends on how much money we blow on our launch party.

What is your stance on diversity?

We at Skitter believe that diversity is a quality that should be found at the most core of every online platform. Most applications use one or two - three if you're lucky - different application frameworks. Not us. Here at Skitter, we take pride in our massively diversified microservice infrastructure. We've got 'em all - Flask, Node.js, Spring, AngularJS, Ruby on Rails, and everyone's favorite - PHP. Our engineers may disagree with this, but we strongly believe that microservice diversity with Make Applications Great Again.

Testing

To set up the environment locally, run:

pip install -r requirements.txt
sudo docker-compose up

This will allow you to run Locust tests across the entire infrastructure. Details about testing individual microservices can be found in the README files for those microservices, if applicable.

API

The Skitter API documentation can be found under "documentation/REFERENCE.md" - please note that new entries will be added as new functionality is designed/implemented.

skitter's People

Contributors

ducphanduyagentp avatar s-newman avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

skitter's Issues

API Endpoint Routing

Basic API Endpoint routing should be created, allowing communication between microservices, databases, and the Internet. If an endpoint is not yet implemented, a 501 Not Implemented response should be returned.

View Skits

Users should be able to view a live feed of their Skits on the dashboard. The dashboard page will regularly query the API Endpoint for this (/getSkits) to get the most recent skits.

CSRF Prevention

Since CSRF tokens are implemented, it should be impossible to carry out a CSRF attack. A script should be created to attempt a few simple CSRF attacks.

Sign Out Users

While not directly handled on the Settings page, users will still need to be able to log out of their account. This will be handled with the /logout API endpoint.

Test the Removal of Skits

Users should be able to remove Skits that they have created, and only Skits that they have created.

Test username changing

We need to ensure that username changes take place as expected. This will test the /changeUserName API endpoint.

JavaScript Validation

A JavaScript validation script should be written to test all JavaScript against established standards.

SQL Database Access

Microservices will need access to the MySQL database, but they shouldn't be allowed direct access. Instead, a /sqlStatement endpoint will be provided by the API gateway only for the microservices. External hosts will not be authorized to access the /sqlStatement endpoint.

CSS Validation

A CSS validator script should be written to test all CSS against the W3C CSS standards.

API Endpoint Authorization Checking

The API gateway should check if a request is authorized to be made. Not all requests can be made from all contexts - for example, a SQL statement request should not be allowed from the general internet, only from the microservice hosts.

Delete Users

Users should be able to delete their accounts through the settings page. The API endpoint for this is /deleteUser.

HTML Input Sanitization

All text input should be run through server-side sanitization before reaching the microservices.
We don't want any stored XSS...

User Profile

Users should be able to view other users' profiles, listing the users' past skits and basic profile information.

Follow and Unfollow Users

Users should be able to follow and unfollow other users as they please. Skits from followed users should appear on the user's dashboard.

Add Skits

Users should be able to add their own skits, limited to 140 characters. These skits will be stored and indexed using ElasticSearch. The API endpoint for this is /addSkit.

View Current User Settings

When the user navigates to their settings page, it should automatically populate with their current settings. The /getSettings API endpoint will be implemented for this feature.

Create User Interface

The User Interface should be created, and as much functionality as possible should be implemented. Any interactions with API endpoints should be replaced with console logging, but all other Javascript should be created.

Check if User is Authenticated

Given a session ID, we should be able to check if a user is currently authenticated. The API endpoint for this is /isAuthenticated.

Change User Profile Image

Users should be allowed to upload a new profile picture. This profile picture must be a certain format and within a certain size limit. Basic initial checks will be performed client-side before calling the API endpoint for this, /changeProfileImage.

Change Email

Users should be able to change their email address if they wish. This will transfer control over their Skitter account to another RIT account, and will require confirmation emails to be sent to the involved email addresses. The API endpoint /changeEmail will be implemented for this.

Add and Remove Replies

Users should be able to reply to Skits, and delete their own responses if they choose to.

Selenium Tests

Selenium tests should be created to ensure that functionality is consistent across all browsers, and that all user interactions function as they should.

Test Profile Picture Uploads

This should simply test that it is possible to upload profile pictures, and that files in the wrong format or files that are too large produce the proper client-side errors. This will test the /changeProfileImage endpoint.

Sign up users and store account information

Once logging in, if a user doesn't have an account, they should be directed to a sign-up page that gathers basic information from them and stores information in the MySQL database. The API endpoint for this issue is /newUser.

Authentication testing

Test the /isAuthenticated API method to make sure unauthenticated users cannot access pages they shouldn't have access to.

Test logouts

When the user logs out, it should actually log them out. This should test the /logout API endpoint.

Create API Gateway

The API Gateway is a critical part of the infrastructure, since it is the first point of contact for all API calls. The gateway will perform server-side input sanitization to prevent dangerous requests from being forwarded to the microservices.

CSRF Token Generation and Verification

The API gateway should create and keep track of CSRF tokens for all pages. This should be taken care of for the microservices, so they don't have to worry about the additional layer of intent authentication. This will implement the /getCSRFToken and /validateCSRFToken API endpoints.

Sign Up and Sign In Users

Users should be able to sign up for accounts and sign into their accounts using their RIT username and password combination.

Make Account Private

Users should be allowed to make their account private, so that only their followers can see their tweets. The API endpoint /changeAccountPrivacy should be created for this.

Add, View, and Remove Skits

Users must be able to add and remove their own Skits, and view Skits from others! That's the whole point of Skitter!

Logout Confirmation

Once the user clicks the "logout" button, they should be linked to the logout confirmation page once the session ID has been deleted from the database.

User Dashboard

Once users log in, they should be directed to their dashboard page. This page (shown roughly in the mockup) will display the latest tweets from their followed users. Static placeholder tweets should be created to give the page some "life". Functions for APIs (buttons, etc.) should be added, and alert() the user with the API endpoint that would be contacted for that function.

Create Account Page

When users sign in, but have not yet created an account, they should be directed to a "create account page" with a few form fields to collect basic information for their account.

Change Username

Users should be allowed to change their username if they don't like it. The /changeUsername endpoint should be implemented for this.

Add RIPS testing

The RIPS Scanner should be used to test for vulnerabilities in the PHP code. A test should be provided to make sure that all PHP code is up-to-spec.

Picture Processing

When users upload profile pictures, we will have to process them to ensure that they aren't trying to sneak in anything malicious. This should be done before reaching the microservices.

Authenticate Users

We should be able to pass username/password pairs to the RIT LDAP server for authentication purposes. The API endpoint for this issue is /signIn.

Remove Skits

Users must be able to remove Skits that they created, if they choose to. The API Endpoint for this is /removeSkit.

Password Brute-Forcing

Attackers should not be able to brute force a user's password. We need to test for and guard against this kind of attack.

Skitter Home Page

Skitter's home page should be a landing page of sorts that prompts users to sign in/sign up. There should also be brief advertisement and branding for Skitter, to convince users that they need this in their lives.

Settings Page

Users should be able to edit their account settings. This should not actually function yet, but provide the same alert() functionality as before - the frontend should work!

Add Users testing

Test the process of adding new users into Skitter. This should test the /signIn and /newUser API endpoints.

Test Email Changing

We need to check if emails can be changed properly. This will test the /changeEmail API endpoint.

HTML Validation

A test should be written to validate all HTML against the W3C markup standards.

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.