Skip to content

Latest commit

Β 

History

History
115 lines (98 loc) Β· 6.95 KB

CONTRIBUTING.md

File metadata and controls

115 lines (98 loc) Β· 6.95 KB

Contribution Guidelines

TakeNote is an open source project, and contributions of any kind are welcome and appreciated. Open issues, bugs, and enhancements are all listed on the issues tab and labeled accordingly. Feel free to open bug tickets and make feature requests. Easy bugs and features will be tagged with the good first issue label.

Issues

If you encounter a bug, please file a bug report. If you have a feature to request, please open a feature request. If you would like to work on an issue or feature, there is no need to request permission. Please add tests to any new features.

Pull Requests

In order to create a pull request for TakeNote, follow the GitHub instructions for Creating a pull request from a fork. Please link your pull request to an existing issue.

Folder Structure

Description of the project files and directories.

β”œβ”€β”€ config/                    # Configuration
β”‚   β”œβ”€β”€ cypress.config.js      # Cypress end-to-end test configuration
β”‚   β”œβ”€β”€ jest.config.js         # Jest unit/component test configuration
β”‚   β”œβ”€β”€ nodemon.config.json    # Nodemon configuration
β”‚   β”œβ”€β”€ webpack.common.js      # Webpack shared configuration
β”‚   β”œβ”€β”€ webpack.dev.js         # Webpack development configuration (dev server)
β”‚   └── webpack.prod.js        # Webpack productuon configuration (dist output)
β”œβ”€β”€ assets/                    # Supplemental assets
β”œβ”€β”€ public/                    # Files that will write to dist on build
β”œβ”€β”€ src/                       # All TakeNote app source files
β”‚   β”œβ”€β”€ resources/             # Shared resources
β”‚   β”œβ”€β”€ client/                # React client side code
β”‚   β”‚   β”œβ”€β”€ api/               # Temporary placeholders for mock API calls
β”‚   β”‚   β”œβ”€β”€ components/        # React components that are not connected to Redux
β”‚   β”‚   β”œβ”€β”€ containers/        # React Redux connected containers
β”‚   β”‚   β”œβ”€β”€ contexts/          # React context global state without Redux
β”‚   β”‚   β”œβ”€β”€ router/            # React private and public routes
β”‚   β”‚   β”œβ”€β”€ sagas/             # Redux sagas
β”‚   β”‚   β”œβ”€β”€ selectors/         # Redux Toolkit selectors
β”‚   β”‚   β”œβ”€β”€ slices/            # Redux Toolkit slices
β”‚   β”‚   β”œβ”€β”€ styles/            # Sass style files
β”‚   β”‚   β”œβ”€β”€ types/             # TypeScript types
β”‚   β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”‚   └── index.tsx          # Client side entry point
β”‚   └── server/                # Node/Express server side code
β”‚       β”œβ”€β”€ handlers/          # Functions for API endpoints
β”‚       β”œβ”€β”€ middleware/        # Middleware for API endpoints
β”‚       β”œβ”€β”€ router/            # Route API endpoints
β”‚       β”œβ”€β”€ utils/             # Backend utilities
β”‚       └── index.ts           # Server entrypoint
β”œβ”€β”€ tests/                     # Test suites
β”‚   β”œβ”€β”€ e2e/                   # Cypress end-to-end tests
β”‚   └── unit/                  # React Testing Library and Jest tests
β”œβ”€β”€ .dockerignore              # Files ignored by Docker
β”œβ”€β”€ .editorconfig              # Configures editor rules
β”œβ”€β”€ .gitignore                 # Files ignored by git
β”œβ”€β”€ .prettierrc                # Code convention enforced by Prettier
β”œβ”€β”€ .travis.yml                # Continuous integration and deployment config
β”œβ”€β”€ CHANGELOG.md               # List of significant changes
β”œβ”€β”€ deploy.sh                  # Deployment script for Docker in production
β”œβ”€β”€ Dockerfile                 # Docker build instructions
β”œβ”€β”€ LICENSE                    # License for this open source project
β”œβ”€β”€ package-lock.json          # Package lockfile
β”œβ”€β”€ package.json               # Dependencies and additional information
β”œβ”€β”€ README.md
β”œβ”€β”€ seed.js                    # Seed the app with data for testing
└── tsconfig.json              # Typescript configuration

Scripts

An explanation of the package.json scripts.

Command Description
dev Run TakeNote in a development environment
dev:test Run TakeNote in a testing environment
client Start a webpack dev server for the frontend
server Start a nodemon dev server for the backend
build Create a production build of TakeNote
start Start a production server for TakeNote
test Run unit and component tests
test:e2e Run end-to-end tests in the command line
test:e2e:open Open end-to-end tests in a browser
test:coverage Get test coverage

Technologies

This project is possible thanks to all these open source languages, libraries, and frameworks.

Tech Description
Codemirror Browser-based text editor
TypeScript Static type-checking programming language
Node.js JavaScript runtime for the backend
Express Server framework
React Front end user interface
Redux Global state management
Webpack Asset bundler
Sass Style preprocessor
OAuth Protocol for secure authorization
ESLint TypeScript linting
Jest Unit testing framework
Cypress End-to-end testing framework

Styleguide

Coding conventions are enforced by ESLint and Prettier.

  • No semicolons
  • Single quotes
  • Two space indentation
  • Trailing commas in arrays and objects
  • Non-default exports are preferred for components
  • Module imports are ordered and separated: built-in -> external -> internal -> css/assets/other
  • TypeScript: strict mode, with no implicitly any
  • React: functional style with Hooks (no classes)
  • const preferred over let