GithubHelp home page GithubHelp logo

jonniespratley / angular-cms Goto Github PK

View Code? Open in Web Editor NEW
335.0 52.0 110.0 17.04 MB

A light weight CMS built with Angular 1.x and Yeoman. This is just a shell and a possibility of being broken

License: Other

JavaScript 69.47% Ruby 0.87% HTML 22.87% CSS 6.72% Shell 0.07%

angular-cms's Introduction

Angular CMS

This is a boilerplate CMS built with Angular, Twitter Bootstrap and Node; it is in development stage and aims to offer a quick start for creating full-stack angular application.

Build Status

Codacy Badge

Coverage Status

Built with Grunt

Bitdeli Badge

Dependency Status

Code Climate

Test Coverage

Technologies

Some featured technologies used in this project include the following:

  • MongoDB - The database of choice is Mongo, its fast, easy and scalable.
  • NodeJS - The server of choice is Node, its JavaScript, its fast and scalable.
  • AngularJS - The client-side framework of choice is Angular, its a full-stack, just what we need.
  • Bootstrap - The client-side ui of choice is Twitter Bootstrap, its updated and clean.
  • HTML5 - Using HTML5 in every way to make a better user experience.
  • Protractor - Using Protractor for all e2e testing.
  • Karma - The test runner is Karma.

Getting Started

To get started on developing with this code base you can either fork the repository or clone it using the following command:

$ git clone https://github.com/jonniespratley/angular-cms.git

Step 1 - Install NPM dependencies

Before you can run or build the application you need to install the dependencies, execute the following command:

$ npm install

Note: You may need to run this as a sudo user.

Step 2 - Install Bower dependencies

Now you need to install the client-side dependencies that is managed by bower, execute the following command:

$ bower install

Step 3 - Start Grunt server

Now you are ready to run the preview server that is used for development, execute the following command:

$ grunt serve

Note: Your default browser should open up to http://localhost:9000

Running the application

To run the application on your local machine please take the following steps.

Step 1 - Start mongodb

To start mongodb execute the following command:

$ sh bin/db.sh

Note: If errors when executing command remove the db/mongod.lock file.

Step 2 - Start REST server

To start the server execute the following command:

$ node server

Note: The REST server is running at http://localhost:8181/api/v2

Development

The following sections are different development tasks that I generally run while developing features.

Karma Unit Tests

To run the Karma unit tests execute the following command:

$ grunt test

Karma e2e Scenario Tests

To run the Karma scenario tests take the following steps:

  1. Start Node server - $ grunt serve
  2. Start REST server - $ node server
  3. Start DB server - $ sh bin/db.sh
  4. Now run the e2e tests by executing:
$ grunt test:e2e

Note: Each step is a ‘new’ terminal window

Protractor e2e Tests

To run the Protractor e2e tests take the following steps:

  1. Start Node server - $ grunt serve
  2. Start REST server - $ node server
  3. Start DB server - $ sh bin/db.sh
  4. Now run the Protractor tests by executing:
$ grunt protractor

Note: Each step is a ‘new’ terminal window


RESTful Server

The server is a Node.js server that supports dynamic RESTful API calls to resource endpoints. It will automatically create a database if it does not exist and collection(s). >>>>>>> fe4af0e14ef3596c823d4777d672ba00406ddb90

The base URL is http://localhost:8181/api/v2

HTTP METHOD ENDPOINT
GET findAll /database/table
GET findById /database/table/:id
POST add /database/table
PUT update /database/table/:id
DELETE destroy /database/table/:id

Tip: To create new collection open http://localhost:8181/api/v2/[DATABASE]/[COLLECTION] in browser.


WebSocket Server

This is a socket server implementation for "real" time.

WebSocket Channels

These are the events that this socket server dispatches.

  1. cms:authorization
  2. cms:client:message
  3. cms:client:connect
  4. cms:client:disconnect
  5. cms:server:message
  6. cms:server:disconnect
  7. cms:server:connect

Themes

Themes will be installed via bower, search and install themes searching by tag angular-cms.

Structure of theme

This is the structure of the themes.

my-theme/
	package.json
	bower.json
	css/
		my-theme.css
	js/
		my-theme.js
	index.html
	partials/
		header.html
		sidebar.html
		footer.html
		content.html

Plugins

Plugins will be installed via bower, search and install themes searching by tag angular-cms.

Structure of plugin


API Documentation

The API documentation will be in the form of ngDocs style. The files located in the content directory are tutorial specs for the different features in this project. Documentation can be generated and viewed by running the following command:

```

$ grunt docs```

Your default browser should open http://127.0.0.1:9191/#/api

(Coming soon)


Important notes

Please don't edit files in the dist subdirectory as they are generated via Grunt. You'll find source code in the app subdirectory! Regarding code style like indentation and whitespace, follow the conventions you see used in the source already.

Modifying the code

First, ensure that you have the latest Node.js and npm installed.

Test that Grunt's CLI and Bower are installed by running grunt --version and bower --version.

  1. Fork and clone the repo.
  2. Run npm install to install all build dependencies (including Grunt).
  3. Run bower install to install the front-end dependencies.
  4. Run grunt to grunt this project.

Assuming that you don't see any red, you're ready to go. Just be sure to run grunt after making any changes, to ensure that nothing is broken.

Submitting pull requests

  1. Create a new branch, please don't work in your master branch directly.
  2. Add failing tests for the change you want to make. Run grunt to see the tests fail.
  3. Fix stuff.
  4. Run grunt to see if the tests pass. Repeat steps 2-3 until done.
  5. Update the documentation to reflect any changes.
  6. Push to your fork and submit a pull request.

TODO

The following list is features that are comming.

  • user management & user roles
  • action and view permissions
  • content versioning and audit
  • i18n support on literals and object versions
  • some form of content import-export
  • assets management and thumbnail generation for uploads
  • Rich text editing (e.g FCKeditor) which generates accessible markup
  • print css and/or print versions of content

angular-cms's People

Contributors

bitdeli-chef avatar jonniespratley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-cms's Issues

Failing build

Need to clean up the package file and resolve bower dependencies correctly so build can run.

Please add a license file

Hi, this project looks similar to mine and I like to share ideas and code. Can you please add a license terms to the repo or readme. Thanks.

linux installation

your index.html looks for the following files with camelCased names, but in the filesystem they are called with all lowercase names :
"scripts/directives/cmswidgets.js",
"scripts/directives/cmswidget.js",
"scripts/directives/cmsuploader.js",
"scripts/directives/cmsheader.js",
scripts/directives/cmsgravatar.js"
"scripts/services/dataservice.js">,
"scripts/services/cmsdataserviceprovider.js",
"scripts/services/cmsdataservicefactory.js",
"scripts/services/cmsusersfactory.js",
"scripts/services/cmsauthservice.js",
"scripts/services/cmssessionservice.js",
"scripts/services/cmsnotify.js"

nice project

feature/plugins

Need to add logic to create and load plugins that are specified in bootstrapping.

Failing Unit tests

I did a git clone, npm install, bower install and then grunt. Everything builds fine, but when it executes the karma tests via phantomJS I get the following:

PhantomJS 1.9.7 (Windows 8) Controller: AppCtrl should attach a list of awesomeThings to the scope FAILED
TypeError: 'undefined' is not an object (evaluating 'scope.awesomeThings.length')
at C:/Workspace/angular-cms/.tmp/spec/controllers/app.js:14
PhantomJS 1.9.7 (Windows 8) Service: cmsDataServiceProvider should do something FAILED
Error: [$injector:unpr] Unknown provider: cmsDataServiceProviderProvider <- cmsDataServiceProvider
http://errors.angularjs.org/1.2.10/$injector/unpr?p0=cmsDataServiceProviderProvider%20%3C-%20cmsDataServiceProvider
at C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3544
at getService (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3671)
at C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3549
at getService (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3671)
at invoke (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3698)
at workFn (C:/Workspace/angular-cms/app/bower_components/angular-mocks/angular-mocks.js:2149)
undefined
PhantomJS 1.9.7 (Windows 8): Executed 36 of 36 (2 FAILED) (0.161 secs / 0.139 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

Failing Unit tests

I did a git clone, npm install, bower install and then grunt. Everything builds fine, but when it executes the karma tests via phantomJS I get the following:

PhantomJS 1.9.7 (Windows 8) Controller: AppCtrl should attach a list of awesomeThings to the scope FAILED
TypeError: 'undefined' is not an object (evaluating 'scope.awesomeThings.length')
at C:/Workspace/angular-cms/.tmp/spec/controllers/app.js:14
PhantomJS 1.9.7 (Windows 8) Service: cmsDataServiceProvider should do something FAILED
Error: [$injector:unpr] Unknown provider: cmsDataServiceProviderProvider <- cmsDataServiceProvider
http://errors.angularjs.org/1.2.10/$injector/unpr?p0=cmsDataServiceProviderProvider%20%3C-%20cmsDataServiceProvider
at C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3544
at getService (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3671)
at C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3549
at getService (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3671)
at invoke (C:/Workspace/angular-cms/app/bower_components/angular/angular.js:3698)
at workFn (C:/Workspace/angular-cms/app/bower_components/angular-mocks/angular-mocks.js:2149)
undefined
PhantomJS 1.9.7 (Windows 8): Executed 36 of 36 (2 FAILED) (0.161 secs / 0.139 secs)
Warning: Task "karma:unit" failed. Use --force to continue.

feature/media

Need to add the upload list/create actions and logic with server side code and unit/e2e tests. 80% coverage.

Installation

on ubuntu 14.04 i had to add:

  • "chalk": "*",
  • "grunt-karma": "~0.8.2",
  • "socket.io-client": "*",
  • "di": "*",
  • "debug": "*",
  • "log4js": "*",
  • "lodash": "*",
  • "useragent": "*",
  • "chokidar": "*",
  • "connect": "*",
  • "q": "*",
  • "source-map": "*",
  • "faye-websocket": "*",
  • "grunt-lib-contrib": "*",
  • "less": "*",
  • "mout": "*",
  • "optimist": "*"

to the depenacnes from grunt to run. after that I am still getting

Local Npm module "grunt-lib-contrib" not found. Is it installed?

Port 9000 conflicts with XDebug

When running grunt server I initially got the following error:

Running "connect:livereload" (connect) task
Fatal error: listen EACCES

Closing PHP Storm which listens on port 9000 when XDebug is enabled, allowed the app to start up correctly but now I can't open PHP Storm! Any reason for not using the standard port 3000?

I tried changing the default port in Gruntfile.js and discovered that the SERVER_PORT variable is currently unused. Got it working by changing the port again on line 88.

Coffee to JavaScript

Need to convert all CoffeeScript to JavaScript. Simply because HTML, CSS, JavaScript rule.

RangeError: Maximum call stack size exceeded

This app is awesome!!!

Unfortunately, it won't run locally:
npm install -> ok
bower install -> ok
grunt serve ->

Running "serve" task

Running "clean:server" (clean) task
ERROR
Warning: Unable to delete ".tmp" file (EACCES, permission denied '.tmp/scripts'). Use --force to continue.

Aborted due to warnings.


Execution Time (2014-08-23 12:36:18 UTC)
loading tasks  4ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 27%
serve          2ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 13%
clean:server   7ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 47%
Total 15ms

sudo grunt serve ->

Running "serve" task

Running "clean:server" (clean) task
>> 1 path cleaned.

Running "concurrent:server" (concurrent) task

    Running "copy:styles" (copy) task
    Copied 2 files

    Done, without errors.


    Execution Time (2014-08-23 12:36:49 UTC)
    loading tasks   8ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇ 26%
    copy:styles    20ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 65%
    Total 31ms

    Running "ngtemplates:app" (ngtemplates) task
    File .tmp/scripts/templates.js created.

    Done, without errors.


    Execution Time (2014-08-23 12:36:49 UTC)
    loading tasks      8ms  ▇▇▇ 6%
    ngtemplates:app  115ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 92%
    Total 125ms

    Running "coffee:dist" (coffee) task
    File .tmp/scripts/app.js created.
    File .tmp/scripts/app.js.map created.
    File .tmp/scripts/config.js created.
    File .tmp/scripts/config.js.map created.
    File .tmp/scripts/controllers/admin.js created.
    File .tmp/scripts/controllers/admin.js.map created.
    File .tmp/scripts/controllers/app.js created.
    File .tmp/scripts/controllers/app.js.map created.
    File .tmp/scripts/controllers/dashboard.js created.
    File .tmp/scripts/controllers/dashboard.js.map created.
    File .tmp/scripts/controllers/docs.js created.
    File .tmp/scripts/controllers/docs.js.map created.
    File .tmp/scripts/controllers/forgot-password.js created.
    File .tmp/scripts/controllers/forgot-password.js.map created.
    File .tmp/scripts/controllers/help.js created.
    File .tmp/scripts/controllers/help.js.map created.
    File .tmp/scripts/controllers/login.js created.
    File .tmp/scripts/controllers/login.js.map created.
    File .tmp/scripts/controllers/main.js created.
    File .tmp/scripts/controllers/main.js.map created.
    File .tmp/scripts/controllers/media.js created.
    File .tmp/scripts/controllers/media.js.map created.
    File .tmp/scripts/controllers/pages.js created.
    File .tmp/scripts/controllers/pages.js.map created.
    File .tmp/scripts/controllers/plugins.js created.
    File .tmp/scripts/controllers/plugins.js.map created.
    File .tmp/scripts/controllers/profile.js created.
    File .tmp/scripts/controllers/profile.js.map created.
    File .tmp/scripts/controllers/register.js created.
    File .tmp/scripts/controllers/register.js.map created.
    File .tmp/scripts/controllers/settings.js created.
    File .tmp/scripts/controllers/settings.js.map created.
    File .tmp/scripts/controllers/sidebar.js created.
    File .tmp/scripts/controllers/sidebar.js.map created.
    File .tmp/scripts/controllers/themes.js created.
    File .tmp/scripts/controllers/themes.js.map created.
    File .tmp/scripts/controllers/users.js created.
    File .tmp/scripts/controllers/users.js.map created.
    File .tmp/scripts/controllers/widgets.js created.
    File .tmp/scripts/controllers/widgets.js.map created.
    File .tmp/scripts/directives/cmsFormGroup.js created.
    File .tmp/scripts/directives/cmsFormGroup.js.map created.
    File .tmp/scripts/directives/cmsPanel.js created.
    File .tmp/scripts/directives/cmsPanel.js.map created.
    File .tmp/scripts/directives/cmsgravatar.js created.
    File .tmp/scripts/directives/cmsgravatar.js.map created.
    File .tmp/scripts/directives/cmsheader.js created.
    File .tmp/scripts/directives/cmsheader.js.map created.
    File .tmp/scripts/directives/cmsuploader.js created.
    File .tmp/scripts/directives/cmsuploader.js.map created.
    File .tmp/scripts/directives/cmswidget.js created.
    File .tmp/scripts/directives/cmswidget.js.map created.
    File .tmp/scripts/directives/cmswidgets.js created.
    File .tmp/scripts/directives/cmswidgets.js.map created.
    File .tmp/scripts/filters/gravatar.js created.
    File .tmp/scripts/filters/gravatar.js.map created.
    File .tmp/scripts/filters/markdown.js created.
    File .tmp/scripts/filters/markdown.js.map created.
    File .tmp/scripts/services/cmsauthservice.js created.
    File .tmp/scripts/services/cmsauthservice.js.map created.
    File .tmp/scripts/services/cmsdataservicefactory.js created.
    File .tmp/scripts/services/cmsdataservicefactory.js.map created.
    File .tmp/scripts/services/cmsdataserviceprovider.js created.
    File .tmp/scripts/services/cmsdataserviceprovider.js.map created.
    File .tmp/scripts/services/cmsnotify.js created.
    File .tmp/scripts/services/cmsnotify.js.map created.
    File .tmp/scripts/services/cmssessionservice.js created.
    File .tmp/scripts/services/cmssessionservice.js.map created.
    File .tmp/scripts/services/cmsusersfactory.js created.
    File .tmp/scripts/services/cmsusersfactory.js.map created.
    File .tmp/scripts/services/dataservice.js created.
    File .tmp/scripts/services/dataservice.js.map created.

    Done, without errors.


    Execution Time (2014-08-23 12:36:49 UTC)
    coffee:dist  705ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 99%
    Total 713ms

Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/bootstrap.css" created.
Prefixed file ".tmp/styles/main.css" created.

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

Running "watch" task
Waiting...Warning: EMFILE: Too many opened files.

Running "watch" task
Waiting...Warning: EMFILE, too many open files 'app'

Running "watch" task
Waiting...Warning: EMFILE, too many open files 'app'

Running "watch" task
Waiting...Warning: EMFILE, too many open files 'app'

Running "watch" task
Waiting...Warning: EMFILE, too many open files 'app'

Seems like the watch task is creating a loop with compass but I can't find it...

install fails

on mac 10.10.5 && linux 15.04:

I get :

Warning: Task "serve" not found. Use --force to continue.

any ideas?

Can't Start REST server

When I try to start the rest server using (node server) i get the following error

events.js:72
throw er; // Unhandled 'error' event
^
Error: Trying to open unclosed connection.
at NativeConnection.Connection.open (c:\git\CMS\angular-cms-develop\node_mod
ules\mongoose\lib\connection.js:210:15)
at Mongoose.connect (c:\git\CMS\angular-cms-develop\node_modules\mongoose\li
b\index.js:212:15)
at Object.ds.connect (c:\git\CMS\angular-cms-develop\node_modules\jps-ds\dis
t\jps-ds.js:54:27)
at new DS (c:\git\CMS\angular-cms-develop\node_modules\jps-ds\dist\jps-ds.js
:234:17)
at Object. (c:\git\CMS\angular-cms-develop\routes\rest.js:43:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

Installation failed on mac os

I've followed the readme.md instruction but:

if I access to http://localhost:8181/ I've just the list of directory's files.
if I access to http://localhost:8181/index.html I get "Cannot GET /index.html" message

additional notes.
when I execute node server I have the following warning:
Listening on port: 8181
Socket.IO's listen() method expects an http.Server instance
as its first parameter. Are you migrating from Express 2.x to 3.x?
If so, check out the "Socket.IO compatibility" section at:
https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x

How to login?

I am running it well on windows but i don't know which account to login to manager? i tried with account: test/test and tried create new account too, but always see an error is undefined. Please help. thanks for creating and help.

Better readme file / Project status

Hi,

It is really difficult to figure out the status of project from the readme file. Especially since the heroku app seems to be down. I was trying to figure out if i can start building stuff on angular-cms, but the scenarios and wireframes on readme makes this look like the project is on early concepting phase. IMHO it would be useful to have quick intro on project and project status on the readme file. (Still trying to figure out if this is something i should watch, use now, use later or possibly start contributing)

grunt serve

cannot find module 'coffee-script'

grunt.js:16:1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.