diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..32c5fab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behaviour: + +1. Go to '...' +2. Click on '....' +3. See error + +**Expected behaviour** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment:** + +- OS: [e.g. iOS] +- Browser: [e.g. chrome, safari] +- Version: [e.g. 22] +- Commit Hash: [e.g. abc1234] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..19f8813 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..2e7f6df --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,25 @@ +# Upup Pull Request Template + +## Description + + + +Fixes # (issue) + +## Type of change + + + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update + +## Checklist + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have updated the CHANGELOG.md file diff --git a/.gitignore b/.gitignore index b2c917e..82eeeb4 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ storybook-static # public folder temp files public /stories/Uploader.stories.js + +.vscode \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7067670 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,53 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behaviour that contributes to a positive environment: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behaviour: + +- The use of sexualized language or imagery +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information without explicit permission +- Other conduct which could reasonably be considered inappropriate + +## Enforcement Responsibilities + +Project maintainers are responsible for clarifying and enforcing our standards of +acceptable behaviour and will take appropriate and fair corrective action in +response to any behaviour that they deem inappropriate, threatening, offensive, +or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behaviour may be +reported to the community leaders responsible for enforcement at +[hello@devino.com](mailto:hello@devino.com). +All complaints will be reviewed and investigated promptly and fairly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), +version 2.0, available at +. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7298a0b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Contributing to Upup + +We love your input! We want to make contributing to Upup 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 +- Becoming a maintainer + +## Development Process + +1. Fork the repo and create your branch from `master` +2. Install dependencies using `pnpm install` or whatever package manager you use +3. Make your changes +4. Run `pnpm run prettier-check` to ensure code style +5. Run `pnpm run lint` to ensure code quality +6. Run `pnpm run test` to ensure everything works as expected +7. Run `pnpm run build` to ensure everything builds properly +8. Create a pull request! + +## Pull Request Process + +1. Update the README.md with details of changes if needed +2. The PR will be merged once you have the sign-off of at least one maintainer + +## Any contributions you make will be under the MIT Software License + +When you submit code changes, your submissions are understood to be under the same [MIT License](LICENSE) that covers the project. + +## Report bugs using Github's [issue tracker](https://github.com/DevinoSolutions/upup/issues) + +We use GitHub issues to track public bugs. + +## Write bug reports with detail, background, and sample code + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening) + +## License + +By contributing, you agree that your contributions will be licensed under its MIT License. + +## References + +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md). diff --git a/README.md b/README.md index 158a3cf..d1c4636 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,13 @@ +# Upup + ![upup_logo_dark](https://github.com/DevinoSolutions/upup/assets/43147238/b5477db9-cb23-43c7-8c12-518beb31af53) -
+An open-source, free-to-use **React component library** that easily handles your file upload needs with seamless DigitalOcean Spaces, Amazon S3, Google Drive, and OneDrive integration. +🎮 Join our Discord, where we can provide quick support: [Discord Invite Link](https://discord.gg/ny5WUE9ayc) -
-

An open-source, free-to-use NPM component that easily handles your file upload needs with seamless Google Drive and OneDrive integration.

-

🎮 Join our Discord, where we can provide quick support: Discord Invite Link

-
-
-

- - - +![Static Badge](https://img.shields.io/badge/gzipped-206kb-4ba0f6) -


-
+--- ## Installation @@ -31,7 +25,7 @@ yarn add @bassem97/upup ## Usage -### 1 - Inside you component or App.tsx import UpupUploader and the types you need: +### 1 - Inside you component or App.tsx import UpupUploader and the types you need ```javascript // imports @@ -46,7 +40,7 @@ import { } from '@bassem97/upup' ``` -### 2 - Set your configurations keys from your .env file (ex: `.env.local`): +### 2 - Set your configurations keys from your .env file (ex: `.env.local`) ```javascript const space_secret = process.env.SPACE_SECRET @@ -61,7 +55,7 @@ const google_app_id = process.env.GOOGLE_APP_ID const google_api_key = process.env.GOOGLE_API_KEY ``` -### 3 - Create 2 states one for key (which will be the final link of you file. ex: 'https://example-documents.nyc3.cdn.digitaloceanspaces.com/file.pdf') and another for canUpload ( which will be changed after uploading file and submitting ) +### 3 - Create 2 states one for key (which will be the final link of you file. ex: ) and another for canUpload ( which will be changed after uploading file and submitting ) ```javascript const [key, setKey] = useState('') @@ -102,7 +96,7 @@ const oneDriveConfigs: OneDriveConfigs = { } ``` -### 4 - Render the UpupUploader component and pass the configs and the adapter you want to use: +### 4 - Render the UpupUploader component and pass the configs and the adapter you want to use ```javascript return ( @@ -123,7 +117,7 @@ return ( ) ``` -### 5 - You can also use the UpupUploader component with the default configs and adapter: +### 5 - You can also use the UpupUploader component with the default configs and adapter ```javascript return ( @@ -140,6 +134,18 @@ return ( ## All done! 🎉 -### Contributions +### Contributing + +Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting pull requests. All contributions fall under our [Code of Conduct](CODE_OF_CONDUCT.md). + +### Security + +For security concerns, please review our [Security Policy](SECURITY.md). + +### License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +--- -Contributions to this project are welcome! Feel free to submit issues or pull requests on the [GitHub repository](https://github.com/uNotesOfficial/upup.git). +Made with ❤️ by [Devino](https://devino.ca/) diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..cdb10dd --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 2.4.x | :white_check_mark: | +| 2.3.x | :white_check_mark: | +| < 2.3 | :x: | + +## Reporting a Vulnerability + +If you discover a security vulnerability within Upup, please send an email to [hello@devino.com](mailto:hello@devino.com). All security vulnerabilities will be promptly addressed. + +Please do not publicly disclose the issue until it has been addressed by the team. + +## Security Update Process + +1. The vulnerability is received and assigned to a primary handler +2. The problem is confirmed and a list of affected versions is determined +3. Code is audited to find any similar problems +4. Fixes are prepared for all supported releases +5. New versions are released and the vulnerability is publicly announced