The current PasteBin has gotten too bulky and doesn't have any searching capabilities. PasteBin 2.0 is a less clunky (minimalistic) version. Our application allows users to create pastes which can be any text or lines of code with a set expiry date (a user may choose to create an indefinite expiration date as well). These pastes are then posted on to the homepage for other users to see. The pastes are in the form of cards which contain the title, body, user’s profile picture, user’s handle, and user’s name. Users can also login to the application via Google or they can choose to remain anonymous. Users that do log in can view their account profile page, view their specific pastes, and create private pastes as well. Anonymous users can only choose to create public or unlisted pastes. Additionally, what makes our application unique from the original PasteBin is that we have filter and search capabilities. We’ve implemented a search bar that allows the user to search for a paste (users can either type the title or body of the paste) and a filter box that users can utilize to view pastes in the order of newest, oldest, or alphabetical.
Archana Dhyani (Front-end)
Blas Kojusner (Front-end)
Param Gupta (Back-end)
Sudhanshu Tarale (Back-end)
- Front-end:
- Angular(latest) with TypeScript Libraries to use: Angular material - https://material.angular.io/
- Back-end:
- Golang
- Embed
- Gorm
- SQLite
https://github.com/Archana90663/New_PasteBin/projects
- The home page provides a list of all pastes so that users can explore
- other pastes(with search functionality comming in the future). The
- ability to set expiry for pastes. Ability to get sharable link of
- pastes. A rich text editor for formatting your pastes
The home page contains a repository of all pastes there to explore.
The latest pastes are within cards.
The cards each contain the user
who made the paste, their @
, and other metadata such as when the paste was created
and when it will expire
, as well as the title and preview of the content of the paste itself.
A user can interact with each of the previewed pastes by clicking on the READ
button within each of the cards to open the paste.
Simply click the new paste
button on the navbar, and fill the form.
Constraints for pastes:-
The title must not be empty.
The title must not be more than 260 charscters
The body must not be empty
The body must not be more that 10,00 characters
The expiry date is optional.
The expiry must not be before the current time.
While creating the paste, there is a DateTime field where you can select the expiry.
While creating the paste, use the language dropdown to select the language for syntax highlighting
Once the paste is created you will be redirected to the page of that particular text, where you simply copy the link and share it.
You can also share a paste you open from the homepage in a similar way.
If you try to open the link of an expired paste, it will display an error message showing the paste has expired.
Users have the ability to login to our application using the Google Login API. This is for users who want to create private pastes as well
Users can also logout and the navbar gets updated accordingly
Users can view their account profile in PasteBin 2.0. It consists of their profile picture, name, email, and username
Users can view all the pastes they've created in the past (as long as they haven't expired yet)
Users have the ability to delete their pastes (as long as they haven't expired yet)
We have created an about page that summarizes what our application is about, how it's different from the original PasteBin, and information about the developers.
If your target machine is not supported by the executable in the releases section, first you will have to build the app. First make sure you have all the requirements installed.
Requirements:-
NodeJs
@angular/cli
Golang
To build the app open your terminal and run the following
cd New_PasteBin
make install
make build
This will create an executable file in the directory New_PasteBin/Server
. The file will be named server
.
First, we have to install all node dependencies
cd new_pastebin_frontend
npm install
cd ..
Then we run the powershell script :- build.ps1
After you build the app or download it from releases, simply execute the executable. This will run the server that will listen to requests on port 8080
.
The homepage of the app will be at localhost:8080/
If you want to run the app without building (useful in the development process), do the following. First, make sure you have all the requirements installed.
Requirements:-
NodeJs
@angular/cli
Golang
The execute the following commands in terminal(one-time setup)
cd New_PasteBin
make install
Finally to run the app, execute
make run
This will host the front end on port 4200
. The homepage will be at localhost:4200
.
The backend will run parallelly on the port 8080
First, we have to install all node dependencies
cd new_pastebin_frontend
npm install
cd ..
Then we run the powershell script :- run.ps1
Refer this for the API documentation
To run tests for the app open your terminal and run the following
cd New_PasteBin
make install
make test
This will run all frontend and backend tests. If you want only want to run the backend golang test, open your terminal and run the following
cd New_PasteBin
make install
make test_go
If you want only want to run the backend postman test, open your terminal and run the following
cd New_PasteBin
make install
make test_postman