{"id":21740536,"url":"https://github.com/writecrow/crow_frontend","last_synced_at":"2026-05-18T17:37:37.280Z","repository":{"id":34394364,"uuid":"152002438","full_name":"writecrow/crow_frontend","owner":"writecrow","description":"The user interface for the Corpus \u0026 Repository of Writing, built in Angular","archived":false,"fork":false,"pushed_at":"2025-02-13T15:22:59.000Z","size":1819,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-13T16:33:11.299Z","etag":null,"topics":["angular","corpora","corpus","corpus-builder","corpus-linguistics","natural-language-processing"],"latest_commit_sha":null,"homepage":"https://crow.corporaproject.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writecrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-08T01:36:08.000Z","updated_at":"2025-02-13T15:23:02.000Z","dependencies_parsed_at":"2024-03-12T18:47:55.216Z","dependency_job_id":"99f24c1f-0e14-4f0b-a842-fa55cb7c6180","html_url":"https://github.com/writecrow/crow_frontend","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcrow_frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcrow_frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcrow_frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writecrow%2Fcrow_frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writecrow","download_url":"https://codeload.github.com/writecrow/crow_frontend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717338,"owners_count":20498284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","corpora","corpus","corpus-builder","corpus-linguistics","natural-language-processing"],"created_at":"2024-11-26T06:13:54.856Z","updated_at":"2026-05-18T17:37:32.227Z","avatar_url":"https://github.com/writecrow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Corpus \u0026 Repository (Frontend)\nThis is the source code for the front-end of a web-based corpus. What does that mean? A corpus is a collection of texts which can be searched \u0026 analyzed. A front-end is the part of a web application that is responsible for the user interface, for sending requests for data \u0026 queries to the \"back-end,\" and then displaying that data.\n\nThis front-end is designed for a specific dataset, the Corpus and Repository of Writing (Crow), which is an inter-institutional collection of student writing. However, it can also provide a starting point for designing a corpus with a different dataset. And the Crow team is available for support \u0026 consulting.\n\nFor the live version of the site, visit https://crow.corporaproject.org.\n\n# Table of contents\n* [Quickstart](#quickstart)\n* [The architecture of this web-based corpus](#architecture)\n* [Building your own corpus](#building-your-own-corpus)\n* [How to make changes to the code](#usage)\n* [How to construct requests via the API](#the-api)\n* [Updating Angular](#updating-angular)\n* [Linkages between corpus \u0026 repository](#linkages)\n\n# Quickstart\n(This assumes [NodeJS](https://nodejs.org/en/) is installed.)\n1. Adjust the backend host as needed in `src/environments/environment.ts`\n2. Get a local host running:\n```\ngit@github.com:writecrow/crow_frontend.git\nnpm install\nnpm install -g @angular/cli\nng serve\n```\n\nNavigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n# Architecture\nCorpora are big-data applications. They must be able to perform complex searches on large datasets. Thanks to the precedents of Google and Amazon, people expect web-based search portals to be fast. Very fast. In order to meet this expectation, a number of contemporary web design patterns must be followed:\n\n- **Decoupled display/data** (see https://pantheon.io/decoupled-cms): instead of delivering all of a web page every time a user performs an action, only update the part of the web page that needs to change.\n- **Multiple layers of caching**: the result of computational operations that will yield the same result (until the dataset is updated) can be stored and the memory-intensive operation can be skipped.\n- **Search index pre-processing**: each searchable thing (i.e. word) in each resource (i.e., text) in the dataset (i.e, the corpus) must be indexed beforehand so that millions of words don't have to be individually crawled at runtime.\n\nIn order to achieve the above, this site was built:\n- Using [AngularJS](https://angularjs.org/), a JavaScript framework whose business logic lives in the browser (and therefore greatly reduces the amount of data that must be sent across the internet on each user action)\n- Using time-based caching on the front-end, and change-sensitive caching on the back-end\n- Using pre-loading of data from the back-end to predict the data a user may request before it is requested\n\n# Building your own corpus\nDeveloping a modern web application requires a not insignificant amount of knowledge not only about a given programming language, but also about programming principles, how data is transferred across the internet, and about the specific framework on which an application is built (in this case, [AngularJS](https://angularjs.org/)).\n\nThe following section will explain how to get up and running for developing with this application, but be forewarned: it may be daunting for non-developers; at the bare minimum, it assumes a familiarity with the command line, `git`, package management, integrated development environments, and local hosting.\n\nThese instructions also assume a UNIX-like environment (e.g., Linux, Mac), so if you're using Windows, you'll need to make some accommodations.\n\n\n1. If you haven't done so, install `node.js` \u0026 `npm` : https://docs.npmjs.com/getting-started/installing-node\n1. Download this repository as you would normally: `git clone https://github.com/writecrow/corpus_frontend.git`\n1. From the directory of the download, run `npm install` to build local components.\n1. Run `ng serve` for a dev server.\n1. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Compiling the code for production\n\n1. If not already present, copy the src/environments/environment.dev.ts into `src/environments/environment.prod.ts` and copy values from the \"Crow build values\" secure note.\n2. Run `ng build --configuration=production` to build the project. The build artifacts will be stored in the `dist/` directory.\n3. Deploy with the `deploy` helper bash tool, which will rsync the `dist` directory to the production server.\n\n# Usage\nThis application is built on the [Angular](https://angularjs.org/) framework, and follows the best practices of said framework. For those familiar with AngularJS, making modifications to the code should be self-obvious.\n\nHowever, for complete beginners, here are a few orientation tips for making general changes, assuming you have successfully got the site running locally at `http://localhost:4200/`; see above):\n\n- All functional code is located in the `src/app` directory\n- The file that defines the \"pages\" (routes) is `src/app/app.module.ts`\n- The back-end base URL is defined in `src/environments/environment.ts`. If you have a different back-end, change it here.\n\nEach \"component\" of the application consists of\n- the `.ts` file, which controls the business logic of route, and the dynamic variables available to the template\n- the `.html` file, which defines the markup that will display on the page, and the placeholders for the dynamic data which can be passed from the `.ts` file\n- the `.css` file, which adds display elements to the component\n\n# The API\nAll dynamic data is retrieved from the backend API, whose base URL is defined in `src/app/api/restAPI.service.ts`.\n\nRequests for specific data can be performed by the parameters explained in the backend repository, at https://github.com/writecrow/corpus_backend#performing-search-requests-via-the-api\n\nFor example, the following URL:\n\nhttps://writecrow.corporaproject.org/texts/word?search=friend+woman\u0026op=or\u0026_format=json\n\nwill return all texts via a standard word search that include the word \"friend\" or \"woman\", returned in JSON format.\n\nThe same result could be returned in XML format with the URL:\n\nhttps://writecrow.corporaproject.org/texts/word?search=friend%20woman\u0026op=or\u0026_format=xml\n\nA result set that requires \"friend\" AND \"woman\" would be:\n\nhttps://writecrow.corporaproject.org/texts/word?search=friend%20woman\u0026op=and\u0026_format=json\n\nFor a systematic explanation of requesting data from the back-end, see https://github.com/writecrow/corpus_backend#performing-search-requests-via-the-api\n\n## Updating Angular\nSee [https://update.angular.io/](https://update.angular.io/)\n\nReplace `@14` with the target version, along with the applicable typescript version specified by the command's output:\n\n```\nng update @angular/core@14 @angular/cli@14 @angular-eslint/builder@14 @angular-eslint/schematics@14 @angular/platform-browser-dynamic@14 @angular/router@14 @angular/platform-browser@14 @angular/material@14 @angular/forms@14 @angular/compiler@14 @angular/cdk@14 @angular/animations@14 @angular-devkit/build-angular@14 @angular/compiler-cli@14 @angular/language-service@14 typescript@4.6\n```\n\n# Linkages\nThe corpus \u0026 repository show related materials based on common metadata. The current logic of these linkages is summarized below:\n\n### Repository interface\nExamples of all 5 linkages can be seen at https://crow.corporaproject.org/repository/1470\n\n1. \"Instructor materials related to this assignment\"\n- Filter logic: institution + course + semester + assignment + year + instructor\n\n2. \"Other materials from this instructor\"\n- Filter logic: institution + course + different assignment or is syllabus + semester + year + instructor\n\n3. \"Materials from other instructors\"\n- Filter logic:institution + course + semester + assignment or IS syllabus + year + different instructor\n\n4. \"Student texts associated with this material\"\n- Filter logic: institution + course + assignment + semester + year + instructor\n\n5. \"Student texts from other instructors\"\n- Filter logic: institution + course + assignment + different instructor\n\n### Corpus interface\nExamples of all 4 linkages can be seen at https://crow.corporaproject.org/corpus/107_LN_3_SAU_1_M_10607_UA_c\n\n1. \"Similar texts from this instructor's course\"\n- Filter logic: institution + course + instructor + assignment\n\n2. \"Similar texts from other instructors' courses\"\n- Filter logic: institution + course + assignment + different instructor\n\n3. \"Instructor materials related to this assignment\"\n- Filter logic: institution + course + instructor + year + semester + assignment OR is a syllabus\n\n4. \"Materials by other instructors\"\n- Filter logic: institution + course + assignment OR is a syllabus + different instructor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Fcrow_frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritecrow%2Fcrow_frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritecrow%2Fcrow_frontend/lists"}