dev-master
9999999-devA notes manager application created with Yii2, providing backend, frontend, console and RESTful API
BSD-3-Clause
The Requires
The Development Requires
yii2 notes restful api crowd-notes to-do list
A notes manager application created with Yii2, providing backend, frontend, console and RESTful API
This is a notes manager application created with Yii2, providing backend, frontend and RESTful API. It can be used for cheat sheets, password keeper, grocery list and much more!, (*1)
..., (*2)
git clone https://github.com/YOUR-GITHUB-USERNAME/crowd-notes.git
git remote add upstream https://github.com/leoshtika/crowd-notes.git
composer install
Note: If you see errors like Problem 1 The requested package bower-asset/jquery could not be found in any version, there may be a typo in the package name, you will need to run:, (*3)
composer global require "fxp/composer-asset-plugin:~1.0.3"
Run the php init file with this command:, (*4)
php init
You will be asked to chose environment. Chose Development (type "0" and press enter), (*5)
Create a new database (MySQL, SQLite, PostgreSQL or other) and run the following SQL query, (*6)
@TODO: Create a migration, (*7)
CREATE TABLE IF NOT EXISTS `item` ( `id` int(11) NOT NULL AUTO_INCREMENT, `note_id` int(11) NOT NULL, `text` text NOT NULL, `status` smallint(6) NOT NULL DEFAULT '10', PRIMARY KEY (`id`), KEY `note_id` (`note_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `note` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `color` varchar(6) NOT NULL DEFAULT 'FFFFFF', `status` smallint(6) NOT NULL DEFAULT '10', `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `first_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `last_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `role` smallint(6) NOT NULL DEFAULT '10', `status` smallint(6) NOT NULL DEFAULT '10', `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `email` (`email`), UNIQUE KEY `password_reset_token` (`password_reset_token`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; ALTER TABLE `item` ADD CONSTRAINT `item_ibfk_1` FOREIGN KEY (`note_id`) REFERENCES `note` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `note` ADD CONSTRAINT `note_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
Configure the database connection via the dsn component property in common/config/main-local.php file, (*8)
Having prepared your develop environment as explained above you can now start working on the feature or bugfix., (*9)
All new features and bug fixes should have an associated issue to provide a single point of reference for discussion and documentation. If you do not find an existing issue matching what you intend to work on, please open a new issue or create a pull request directly if it is straightforward fix., (*10)
You should start at this point for every new contribution to make sure you are working on the latest code., (*11)
git checkout master git pull upstream master
Each separate bug fix or change should go in its own branch. Branch names should be descriptive and start with the number of the issue that your code relates to. If you aren't fixing any particular issue, just skip number. For example:, (*12)
git checkout -b 999-name-of-your-branch
All new code should follow PSR-2 coding standard. Make sure it works :), (*13)
git add --all git commit -m "Resolve #999: A brief description of this change"
Before pushing your code to GitHub make sure to integrate upstream changes into your local repository, (*14)
git checkout master git pull upstream master git checkout 999-name-of-your-branch git rebase master
This ensures that your changes can be merged with one click., (*15)
Squash commits This step is not always necessary, but is required when your commit history is full of small, unimportant commits., (*16)
git rebase -i master
git push -u origin 999-name-of-your-branch
Go to your repository on GitHub and click "Pull Request", choose your branch on the right and enter some more details in the comment box. To link the pull request to the issue put anywhere in the pull comment #999 where 999 is the issue number. Note that each pull-request should fix a single change., (*17)
Someone will review your code, and you might be asked to make some changes, if so go to step #5 (you don't need to open another pull request if your current one is still open). If your code is accepted it will be merged into the main branch and become part of the next release., (*18)
After your code was either accepted or declined you can delete branches you've worked with from your local repository and origin., (*19)
git checkout master git branch -D 999-name-of-your-branch git push origin --delete 999-name-of-your-branch
A notes manager application created with Yii2, providing backend, frontend, console and RESTful API
BSD-3-Clause
yii2 notes restful api crowd-notes to-do list