Skip to content

Commit

Permalink
docs(app): create the read me for all the projects
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Mar 20, 2022
1 parent eaed219 commit 1a089e7
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 23 deletions.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to Sharingan
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features

## Local Setup
Follow the instructions in the page below to set up the project on your local environment

[Set up Sharingan Locally](https://github.com/tericcabrel/sharingan/wiki/Local-setup)

## Pick an existing issue to contribute
Add a comment on the issue and wait for the issue to be assigned before you start working on it. This helps to avoid multiple people working on similar issues.

## Add changes in the code base
We actively welcome your pull requests, below is the process to add a change:

1- Create an issue where you explain clearly the problem you want to solve

2- Fork the repo and create your branch from `main`. Please create the branch in the format <author>/feat/<issue-name> (eg: eric/feat/add-new-auth-method)

3- If the code you added require a test, write them

4- Ensure the test suite passes.

5- Ensure the code lint succeed

6- Make a Pull Request

## Contributions License
When you submit code changes, your submissions are understood to be under the same [MIT License](https://opensource.org/licenses/MIT) that covers the project.

## Report bugs using GitHub's [issues](https://github.com/tericcabrel/sharingan/issues)
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/tericcabrel/sharingan/issues/new). It's that easy!

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

## License
By contributing, you agree that your contributions will be licensed under its AGPL v3 License.

## Questions?
Send a mail at [[email protected]](mailto:[email protected]).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2022] [Eric Cabrel TIOGO]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# Sharingan

A code sharing web application
Sharingan is an open-source code sharing platform that makes it easy to create code snippets
and sharing it with the world.

## Key Features
* Create private or public code snippets with tags
* Browse and search into public code snippets
* Create folder to group your code snippets by category
* Generate a link to share a code snippet
* Add comments to a code snippet
* Import code snippet from GitHub Gist

## Project structure
```text
sharingan/
├─ apps/
│ ├─ core/
│ ├─ web/
├─ functions/
├─ packages/
│ ├─ common/
package.json
tsconfig.base.json
tsconfig.json
turbo.json
```

## Contributing
Kindly read our [Contributing Guide](./CONTRIBUTING.md) to learn and understand about our development process, how to propose bug fixes and improvements, and how to build and test your changes to Sharingan.

## License

This project is developed under the [MIT License](/LICENSE)
69 changes: 69 additions & 0 deletions apps/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Sharingan Core

This is the core backend of Sharingan. All the business logics behind this application are implemented here.

## Tech Stack
* Node.js
* Typescript
* GraphQL
* MySQL

## Prerequisites
Make sure you have this tools installed before running the project
* Node.js 14+
* NPM or Yarn
* Docker
* AWS CLI v2

## Packages dependencies
We use Yarn workspace to create packages we can share with others applications.
These packages are located in the folder `packages` so, you can find yourself needing to change
code inside one or many packages to implement a feature. Here are the packages used in the core backend application:

* common

## Set up the project
Delete the existing folders output from build commands
```shell
yarn clean
```
Install node modules
````shell
yarn install
````
Create configuration file from the template
```shell
cp .env.template .env

# Edit configuration to match your local environment and save
nano .env
```
| Variable | Description |
|----------|------------------------------------------------------------------------|
| HOST | Host name where the application is running (default: http:https://localhost) |
| PORT | Port number of the application (default: 7500) |

Start Application
```bash
yarn dev
```
The application will be launched by [Nodemon](https://nodemon.com).

Open [http:https://localhost:7500](http:https://localhost:7500) with your browser to see the result.

## Running tests
Run the command below to run all the tests
```shell
yarn test
```
To run a specific test file, append the filename after the command
```shell
yarn test controller.test.ts
```

## Lint the project
ESLint and Prettier are used to normalize the code style across the project.
Linting the code make sure there is no error
```shell
yarn lint
```
Empty file added apps/functions/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions apps/web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_ENV=development
75 changes: 53 additions & 22 deletions apps/web/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,65 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# Sharingan Core

## Getting Started
This is the frontend of Sharingan. It holds the website landing page, the web application and the blog pages

First, run the development server:
## Tech Stack
* Next.js
* Tailwind CSS

```bash
npm run dev
# or
yarn dev
```

Open [http:https://localhost:3000](http:https://localhost:3000) with your browser to see the result.
## Prerequisites
Make sure you have this tools installed before running the project
* Node.js 14+
* NPM or Yarn

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
## Packages dependencies
We use Yarn workspace to create packages we can share with others applications.
These packages are located in the folder `packages` so, you can find yourself needing to change
code inside one or many packages to implement a feature. Here are the packages used in the core backend application:

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http:https://localhost:3000/api/hello](http:https://localhost:3000/api/hello). This endpoint can be edited in `pages/api/index.ts`.
* common

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More
## Set up the project
Delete the existing folders output from build commands
```shell
yarn clean
```
Install node modules
````shell
yarn install
````
Create configuration file from the template
```shell
cp .env.template .env.local

To learn more about Next.js, take a look at the following resources:
# Edit configuration to match your local environment and save
nano .env.local
```
| Variable | Description |
|----------|---------------------------------------------------------------------|
| APP_ENV | Environment where the application is running (default: development) | |

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
Start Application
```bash
yarn dev
```
The application will be launched by [Nodemon](https://nodemon.com).

## Deploy on Vercel
Open [http:https://localhost:7501](http:https://localhost:7501) with your browser to see the result.

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
## Running tests
Run the command below to run all the tests
```shell
yarn test
```
To run a specific test file, append the filename after the command
```shell
yarn test home.test.ts
```

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
## Lint the project
ESLint and Prettier are used to normalize the code style across the project.
Linting the code make sure there is no error
```shell
yarn lint
```
45 changes: 45 additions & 0 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Sharingan Common

This package holds utilities functions that can be used in the Backend or Frontend application

## Tech Stack
* Node.js
* Typescript

## Prerequisites
Make sure you have this tools installed before running the project
* Node.js 14+
* NPM or Yarn

## Set up the project
Delete the existing folders output from build commands
```shell
yarn clean
```
Install node modules
````shell
yarn install
````

Build the package to generate types declaration required to provide autocompletion while using the functions in the core or web applications
```bash
yarn build
```
A `dist` folder will be generated.

## Running tests
Run the command below to run all the tests
```shell
yarn test
```
To run a specific test file, append the filename after the command
```shell
yarn test utils.test.ts
```

## Lint the project
ESLint and Prettier are used to normalize the code style across the project.
Linting the code make sure there is no error
```shell
yarn lint
```

0 comments on commit 1a089e7

Please sign in to comment.