Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Readme and API Documentation #1

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions Backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@

## API Documentation

#### Test Server

```http
GET /test
```
---------------------------------------------------

#### Get Repositories

```http
GET /getrepos
```

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `Access_Token` | `string` | **Required**. Access Token of respective Github User |

----------------------------------------------------
#### Get Access Token

```http
GET /getaccesstoken/{User_Name}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |

-----------------------------------------------------
#### Get Contributions

```http
GET /getcontribution/{User_Name}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |


-----------------------------------------------------
#### Commit Code

```http
PUT /commitCode/{User_Name}/{Repo_Name}/{File_Path}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |
| `Repo_Name` | `string` | **Required**. Github Repository Name |
| `File_Path` | `string` | **Required**. Path of the File |

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `commitMessage` | `string` | **Required**. Commit Message |
| `ownerMail` | `string` | **Required**. Email ID in which commit is to be done |
| `content` | `string` | **Required**. Code to be commited |

-----------------------------------------------------
#### Get Email

```http
GET /getemail/{User_Name}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |


-----------------------------------------------------
#### Login

```http
POST /login
```

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |
| `Password` | `string` | **Required**. Code-Mover User Password |


-----------------------------------------------------
#### Register

```http
POST /register
```

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |
| `Password` | `string` | **Required**. Password to be Updated |
| `Access_Token` | `string` | **Required**. Valid Github Access Token |
| `Password` | `string` | **Required**. Email ID of the User |


-----------------------------------------------------
#### Generate OTP

```http
POST /otp/{User_Name}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |



-----------------------------------------------------
#### Verify OTP

```http
POST /otp/verify/{User_Name}
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `otp` | `string` | **Required**. One Type Password sent to User's Email |


-----------------------------------------------------
#### Update Profile

```http
POST /updateprofile/:type/:User_Name
```

| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `User_Name` | `string` | **Required**. Github User Name |
| `type` | `string` | **Required**. Type of Profile Updation. Password or Profile |

| Body | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `Email` | `string` | **Required**. New Email ID of the User |
| `Access_Token` | `string` | **Required**. New Access Token to be Updated |
| `Password` | `string` | **Required**. New Password to be Updated |
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# Code-Mover


Code-Mover: This web application streamlines the process for Computer Science and Engineering (CSE) students to manage their Data Structures and Algorithms (DSA) code on GitHub.
By integrating with GitHub, the platform automates the uploading of code while allowing users to add additional information about each code snippet, such as its complexity analysis,
and usage scenarios. This enhances organization and accessibility for students maintaining their DSA codes, facilitating easier collaboration and knowledge sharing
within the community. The application aims to simplify the workflow for CSE students, saving time and effort in managing their coding projects effectively.


## Tech Stack

**Client:** HTML, CSS, Javascript

**Server:** Node, Express

**Database:** AWS-DynamoDB


## Contributing

Contributions are always welcome!

See `contributing.md` for ways to get started.

Please adhere to this project's `code of conduct`.


## API Documentation

[API-Reference](/Backend/README.md)


## Deployment

Code-Mover has been deployed using Heroku [PaaS] platform with two servers for frontend and backend respectively.


## Environment Variables

To run this project, you will need to add the following environment variables to your .env file

`AWS_ACCESS_KEY_ID`

`AWS_SECRET_ACCESS_KEY`

`AWS_REGION`

`saltRounds`

`CodeMover_Mailer`

`clientId`

`clientSecret`

`refreshToken`

`MailGun_API`



## Authors

- [Naganathan M R](https://github.com/Naganathan05)
- [Lowkik Sai P](https://github.com/Lowkik-Sai)


## FAQ

#### How to generate Github Access Token ?

* **Log in to GitHub:** Go to the GitHub website and log in to your GitHub account.

* **Access Personal Access Tokens settings:** Once logged in, click on your profile picture in the top-right corner of the page, and then click on "Settings".

* **Navigate to Developer settings:** In the Settings page, scroll down to the left sidebar and click on "Developer settings".

* **Generate a new token:** In the Developer settings page, click on "Personal access tokens".

* **Generate new token:** Click on the "Generate new token" button.

* **Provide necessary information:** You'll be asked to provide a name for your token and select the scopes (permissions) you want to grant it. Make sure to only grant the necessary permissions based on what your application requires.

* **Generate token:** After selecting the scopes, click on the "Generate token" button.

* **Copy the token:** Once the token is generated, make sure to copy it immediately. This token will not be shown again, so you need to save it in a secure location.

* **Use the token:** You can now use this token as an authentication mechanism in your application to access GitHub resources on behalf of the user.

#### How to Navigate between questions in the chat bot ?

* **Help Page:** You can refer to the help page for utilising the extra commands which facilitate easy navigation between questions in the chat bot.