Samplestack is a comprehensive sample application that is the best way to learn how to build a MarkLogic application effectively. It is intended as a tool for exploration, reference, and extension. Start by visiting the GitHub site where Samplestack is being developed publicly as an open-source project under the Apache 2.0 license. Contribute pull requests, provide feedback and participate in the conversation through issue reports in the GitHub repository. You can also track features and bug fixes that are on our roadmap.
We built each application feature to demonstrate powerful and unique MarkLogic concepts. Even though it's a sample application, Samplestack has enterprise-grade features such as transactional multi-document, multi-statement commits and role-based security.
The Java and Node.js versions of Samplestack are available now, with the following features implemented from database server to browser. Follow along on GitHub as active development continues.
|Samplestack Application Feature||MarkLogic Concept|
|Full-text Search||Indexes, query styles|
|User records and Q&A documents||Data Model for JSON and POJOs|
|Users & Roles (log in, log out)||Security (authentication and authorization)|
|Restricted Content||Role-based Permissions|
|Facets||Search constraints, analytics|
|Ask, Answer, Comment||Document updates|
|Voting||Updates impact search relevance|
|Accepted Answers & Reputation||Transactional model, data integrity|
Focus on the middleware and its use of MarkLogic's client APIs:
- View the database configurations and the application code to see how Java/Spring middle tier consumes the data services provided by the MarkLogic database via the Java API.
- Browse the Node.js middle tier to get a feel for how the Node.js API provides access to MarkLogic's built-in search and security features.
In order to make Samplestack relevant to your development environment, we’ve also included components for the last mile of application development for a richer, hands-on experience:
- Build: Gradle is used for deployment and configuration automation of the Java middle tier. Gulp is the tool used to automate building the browser-side components as well as the Node.js middle tier.
- Testing: The project includes unit tests and integration tests that automate orchestration of set-up and tear-down.
- JUnit is the testing framework for the Java middle tier.
- The Angular.js browser tests are run by Node.js. Other technologies used for testing include mocha, chai, and sinon.
Visit the Samplestack repository on GitHub.