aqua 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
aqua 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
aqua 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT License
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 Web应用开发Web框架
开源组织
地区 不详
投 递 者 首席测试
适用人群 未知
收录时间 2021-11-30

软件简介

No longer maintained

Boilerplates can be a huge time sink to maintain and I've decieded to archive this project.

I started the work for upgrading to hapi v17 and using async/await instead of callbacks, that work can be found in the hapi-17-async-await branch.

Thanks for your interest in my projects.


Aqua

A website and user system starter.

Build Status

Features

  • Universal front-end website
    • Basic web pages ready to customize
    • Contact page with form to email
    • Account sign-up page
    • Login pages including forgot and reset password
  • My account area
    • Stub dashboard ready to customize
    • Settings screen to update contact info and login credentials
  • Admin back office
    • Stub dashboard ready to customize
    • Manage accounts, admins, groups and users
    • Use groups (like departments) for shared permissions
    • Granular permissions override group permissions

Live demo

url username password
https://getaqua.herokuapp.com/ root root

Technology

Server side, Aqua is built with the hapi framework. We're using MongoDB as a data store.

The front-end is built with React. We use Redux as our state container. Client side routing is done with React Router. We're using Gulp for the build system.

We use bcrypt for hashing secrets. If you have issues during installation related to bcrypt then refer to this wiki page.

API only

If you don't use React and/or would rather bring your own front-end, checkout Frame. It's just the HTTP API parts of Aqua.

Installation

$ git clone git@github.com:jedireza/aqua.git
$ cd aqua
$ npm install

Configuration

Simply edit config.js. The configuration uses confidence which makes it easy to manage configuration settings across environments. Don't store secrets in this file or commit them to your repository.

Instead, access secrets via environment variables. We use dotenv to help make setting local environment variables easy (not to be used in production).

Simply copy .env-sample to .env and edit as needed. Don't commit .env to your repository.

First time setup

WARNING: This will clear all data in the following MongoDB collections if they exist: accounts, adminGroups, admins, authAttempts, sessions, statuses, and users.

$ npm run first-time-setup

# > aqua@0.0.0 first-time-setup /home/jedireza/projects/aqua
# > node first-time-setup.js

# MongoDB URL: (mongodb://localhost:27017/aqua)
# Root user email: jedireza@gmail.com
# Root user password:
# Setup complete.

Running the app

$ npm start

# > aqua@0.0.0 start /Users/jedireza/projects/aqua
# > gulp react && gulp

# [23:41:44] Using gulpfile ~/projects/aqua/gulpfile.js
# ...

Now you should be able to point your browser to http://127.0.0.1:8000/ and see the welcome page.

nodemon watches for changes in server code and restarts the app automatically. gulp and webpack watch the front-end files and re-build those automatically too.

We also pass the --inspect flag to Node so you have a debugger available. Watch the output of $ npm start and look for the debugging URL and open it in Chrome. It looks something like this:

chrome-devtools://devtools/remote/serve_file/@62cd277117e6f8ec53e31b1be58290a6f7ab42ef/inspector.html?experiments=true&v8only=true&ws=localhost:9229/node

Running in production

$ node server.js

Unlike $ npm start this doesn't watch for file changes. Also be sure to set these environment variables in your production environment:

  • NODE_ENV=production - This is important for many different optimizations, both server-side and with the front-end build files.
  • NPM_CONFIG_PRODUCTION=false - This tells $ npm install to not skip installing devDependencies, which we need to build the front-end files.

Have a question?

Any issues or questions (no matter how basic), open an issue. Please take the initiative to read relevant documentation and be proactive with debugging.

Want to contribute?

Contributions are welcome. If you're changing something non-trivial, you may want to submit an issue before creating a large pull request.

Running tests

Lab is part of the hapi ecosystem and what we use to write all of our tests.

$ npm test

# > aqua@0.0.0 test /Users/jedireza/projects/aqua
# > lab -t 100 -S -T ./test/lab/transform -L --lint-options '{"extensions":[".js",".jsx"]}' ./test/lab/client-before.js ./test/client/ ./test/lab/client-after.js ./test/server/ ./test/lab/server-after.js ./test/misc/

#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ...............

# 865 tests complete
# Test duration: 6382 ms
# No global variable leaks detected
# Coverage: 100.00%
# Linting results: No issues

Targeted tests

If you'd like to run a specific test or subset of tests you can use the test-client and test-server scripts included in the package.json file.

You specificy the path(s) via the TEST_TARGET environment variable like:

$ TEST_TARGET=test/server/web/main.js npm run test-server

# or

$ TEST_TARGET=test/client/actions/api.js npm run test-client

License

MIT

Don't forget

What you build with Aqua is more important than Aqua.

展开阅读全文

代码

评论 (0)

加载中
更多评论
暂无内容
2013/07/09 09:27

aqua data studio乱码处理

最近用aqua data studio这个软件来连接数据库,结果杯具了,中文是乱码,google了半天,发现了如下解决方法,记录下. 具体操作: 在工具栏打开“文件”->“选项”->修改“编辑器字体”、“文本结果字体”、“网络结果字体”,都行、改成宋体就可以了。

0
0
发表了博客
2015/10/22 16:17

Aqua Data Studio 数据库工具使用

Aqua Data Studio是一款完整IDE的数据库开发工具,它提供3种主要功能:数据查询与管理工具。比对数据工具与源控制和文件系统的整合工具。帮助你创建,编辑 和执行 SQL 的管理工具脚本编写,以及浏览和修改数据库组织。对所有主要关系的数据库提供一个一致的界面。这准许数据库主管或者开发者从一个应用程序同时地处理多个的 任务。 1打开工具 添加你要比较的两个数据库 2修改表结构 3在previewSQL中自动生成sql语句 4 执行查询语...

0
6
发表了博客
2019/07/31 20:44

NS-3 和Aqua-sim-ng 学习笔记(一)

因为要搞水下网络,OMNET++不太合适,就转Aqua-sim。这是基于NS-2上的模型,NS-2需要额外学一门tcl脚本语言。 正好查到它的一个升级版Aqua-sim-NG,在github上,https://github.com/rmartin5/aqua-sim-ng是基于NS-3的,只需要基本的C++,不用学tcl语言。美滋滋。 装好ubuntu之后,安装NS-3和Aqua-sim。 注意:NS-3安装前有一下依赖包,需要安装。 NS-3安装教程:https://blog.csdn.net/rical730/article/details/71504169 https...

0
0
发表于数据库专区
2016/08/15 09:43

Aqua Data Studio数据库连接工具解决Sybase中文乱码问题

Sybase的中文乱码是一个很让人烦恼的问题,本文主要介绍使用AquaDataStudio的时候如何解决乱码问题。 打开程序界面: 如图选择: 如果弹出如下框警告,那么意思是让你先选择数据库,否则软件不知道你设置的是哪一个数据库。 正常弹出的界面如下,按照图上选择的 这样乱码问题就可以解决了。重点:设置之后需要重新启动,切记切记!否则不会生效

0
0
没有更多内容
加载失败,请刷新页面
点击加载更多
加载中
下一页
暂无内容
0 评论
0 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部