{"id":18081984,"url":"https://github.com/vindarel/abstock","last_synced_at":"2026-02-16T08:04:59.070Z","repository":{"id":67525097,"uuid":"253878715","full_name":"vindarel/ABStock","owner":"vindarel","description":"Your catalogue of books and other products.","archived":false,"fork":false,"pushed_at":"2025-03-01T13:06:37.000Z","size":2528,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-01T14:20:17.755Z","etag":null,"topics":["bookshops","bookstore","bookstore-web","bookstoreonline","common-lisp","selling-platform"],"latest_commit_sha":null,"homepage":"https://abstock.org","language":"Common Lisp","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vindarel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["vindarel"],"ko_fi":"vindarel","liberapay":"vindarel"}},"created_at":"2020-04-07T18:26:40.000Z","updated_at":"2025-03-01T13:06:42.000Z","dependencies_parsed_at":"2023-02-20T21:31:13.482Z","dependency_job_id":null,"html_url":"https://github.com/vindarel/ABStock","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2FABStock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2FABStock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2FABStock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vindarel%2FABStock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vindarel","download_url":"https://codeload.github.com/vindarel/ABStock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411241,"owners_count":20934650,"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":["bookshops","bookstore","bookstore-web","bookstoreonline","common-lisp","selling-platform"],"created_at":"2024-10-31T13:17:41.934Z","updated_at":"2025-10-11T18:49:43.867Z","avatar_url":"https://github.com/vindarel.png","language":"Common Lisp","funding_links":["https://github.com/sponsors/vindarel","https://ko-fi.com/vindarel","https://liberapay.com/vindarel","https://liberapay.com/vindarel/donate","https://ko-fi.com/K3K828W0V'"],"categories":[],"sub_categories":[],"readme":"[![Gitter](https://badges.gitter.im/openbookstore-developers/community.svg)](https://gitter.im/openbookstore-developers/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n\u003cp\u003e\n  \u003ch2 align=\"center\"\u003e ABStock \u003c/h2\u003e\n  \u003ch3 align=\"center\"\u003e Catalogue and commands online \u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://abstock.gitlab.io\"\u003e\u003cb\u003eHomepage\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://abstock.gitlab.io/#/en/install\"\u003e\u003cb\u003eInstall\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://framasphere.org/people/4ac5fae0bed90133a3ed2a0000053625\"\u003e\u003cb\u003eBlog\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://gitter.im/openbookstore-developers/community?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link\"\u003e\u003cb\u003eGitter chat\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://liberapay.com/vindarel/donate\"\u003e\u003cb\u003eSupport us on Liberapay\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://ko-fi.com/vindarel\"\u003e\u003cb\u003eBuy me a coffee!\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"/README_fr.md\"\u003eFrançais\u003c/a\u003e\n\n  Clients can now discover your stock and shop online.\n\n\u003c/p\u003e\n\nABStock was developed during the global lock-down to help a bookshop\nkeep an activity and a link with its clients. It proved 100%\nuseful. You can have a site on the same model.\n\n*Update, November 2022*: you can now have a more evolved website with (optional) online payments. Check this demo: [https://librairie.abelujo.cc/](https://librairie.abelujo.cc/).\n\n[Install it yourself](/docs/en/install.md) or ask us. Contact us at `contact@abelujo.cc`.\n\nThe website features by default the following pages, all customizable:\n\n- a welcome screen, with:\n  - the bookshop's information,\n  - a search form,\n  - a pre-selection of the books to showcase,\n- a form to start searching books. A visitor can search by title, authors, publisher, shelf and ISBN(s).\n- a shopping basket, for visitors to add books in\n- a confirmation form, which sends the command by email to the shop owner, and a confirmation email to the client,\n- a special page to showcase a selection.\n  - they can be chosen from Abelujo or defined in a file\n- an **admin page** to change the text shown on different pages, with a rich-text editor: [Stylo](https://stylojs.com/). **New** on April, 2022.\n  - your admin URL is printed to standard output when you start the app (there are no user accounts). See the documentation.\n\nHere's how searching the stock looks like by default (we can build themes on-demand):\n\n![welcome screen](search.png \"welcome screen\")\n\n\nABStock can load data from several places:\n\n- by default, it connects to the [Abelujo](http://abelujo.cc/)\ndatabase. Abelujo is a free software for bookshops, that manages\ninventories, sells, and the like. The database is loaded in memory at\nstartup, doesn't access it afterwards, and is synced several times a\nday.\n- it can load data stored in a simple txt format (see\n  `cards-example.txt`). You can define books, or other products:\n\n![](other-data.png)\n\nInterested? Please get in touch.\n\n\u003ca href='https://ko-fi.com/K3K828W0V' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi2.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n### Other features\n\n- access a simple admin page to edit the application's texts with a rich editor.\n- translate URLs (\"/book/\u003cslug\u003e\" or \"/livre/\u003cslug\u003e\")\n- redefine anything with the pre- and post-config files, written in the programming language of the application (Lisp)\n\n## Install\n\nABStock is known to work on:\n\n- SBCL\n- CCL\n\n\n### Quick install on Debian Buster 10\n\nupdate: you can try a self-contained binary for Debian Buster. [Download it here](https://gitlab.com/vindarel/abstock/-/jobs/artifacts/master/raw/abstock?job=build). Download it and run it with\n\n    ./abstock\n\nYou do *not* need to install a Lisp implementation.\nIf you use it, please give us feedback [here](https://gitlab.com/vindarel/abstock/-/issues/8). Thanks!\n\n\nHere's the universal recipe to run ABStock from sources:\n\n```bash\n# create a user for abstock or reuse the user of abelujo\napt install rlwrap sbcl cl-quicklisp git make\ngit clone https://gitlab.com/vindarel/abstock.git\ncd abstock\n# Copy or ln you db.db sqlite from abelujo\nln -s /home/abelujo/repo/db.db db.db\n\nsbcl --load /usr/share/cl-quicklisp/quicklisp.lisp --eval '(quicklisp-quickstart:install)' --eval '(ql:add-to-init-file)' --eval '(quit)'\n# or /usr/share/common-lisp/source/quicklisp/quicklisp.lisp on Debian 10.\nmake deps\n# install it and run it with\nmake run\n# aka\n# rlwrap sbcl --load run.lisp --eval '(in-package :abstock)'\n# use ctrl d to exit\n```\n\n### Quick install on a Raspberry Pi\n\nSBCL lacks thread support on ARM 32 bits so we'll use Clozure Common\nLisp. It's easy to install and its compilation times are stellar.\n\n```bash\n# in root:\ncd /usr/local/src/\nwget https://github.com/Clozure/ccl/releases/download/v1.11.5/ccl-1.11.5-linuxarm.tar.gz\ntar -xvze ccl-1.11.5-linuxarm.tar.gz\ncp ccl/scripts/ccl /usr/local/bin/ccl\nrm ccl-1.11.5-linuxarm.tar.gz\n\n# in normal (abstock) user:\n# ensure Quicklisp is installed:\nccl -l /usr/share/common-lisp/source/quicklisp/quicklisp.lisp -e '(quicklisp-quickstart:install)(ql:add-to-init-file)(ccl:quit)' -b\nccl --load run.lisp -e '(in-package :abstock)'\n# to quit: (ccl:quit) or C-d\n```\n\n## Theme\n\nYou have several ways to customize ABStock, from CSS tweaking to a full theme rewrite.\n\n1. Write your own CSS rules into `src/static/theme.css`. This file is always loaded by the base template and is out of source control. You can create a symlink to it.\n2. Use Bulma customization capabilities.\n3. Change the HTML and CSS content of some pages through configuration variables.\n4. Write your own templates and override the default ones. See the documentation: http://abstock.org/#/en/develop\n\n**important**: for the good of the project, think about sharing your\nwork! Link it [in the wiki](https://gitlab.com/vindarel/abstock/-/wikis/home), send us an email or open an issue. Many thanks in advance.\n\nHere's a real world example theme of ours. You can contact us to have a pretty one too ;)\n\n![](abstock-leblason.png \"https://catalogue.librairieleblason.com/\")\n\n\n## Deployment\n\nYou can run the app as a script:\n\n    rlwrap sbcl --load run.lisp --eval '(in-package :abstock)'\n\nor run the binary:\n\n    ./abstock\n\nIf you use the script, you are landed into the Lisp REPL. You can\ninspect and update the application from there. See `(help)`. You can\nactually do anything, including installing new Quicklisp\nlibraries. You can connect to the running instance from home through\nSSH.\n\nHTML changes are automatically taken up by the server. (you can switch\nthis off, this Djula's documentation).\n\n### Environnement variables\n\n- `AB_PORT` to set the port (defaults to 8989). Takes precedence on the configuration file.\n\n\n### Reloading the shelves and the cards in the Lisp shell\n\nWhen you are in lisp shell and Abstock is runing you can reload the shelves or the cards:\n\n#### Reload cards\n```lisp\n(get-all-cards)\n```\n#### Reload shelves\n```lisp\n(get-all-shelves)\n```\n\n#### Fetch books' summaries\n\n```lisp\n(setf *fetch-summaries* t)\n```\n\nIt will fetch the book's summary asynchronously on its datasource\n(french one supported) when a visitor visits the book's page.\n\nThis is not activated by default yet.\n\n### Systemd\n\nBuild the binary, then in `/etc/systemd/system/abstock.service`:\n\n```\n[Unit]\nDescription=Abstock\n\n[Service]\nRestart=on-failure\nWorkingDirectory=/home/abstock/repo\nExecStart=/home/abstock/repo/abstock --pid PID.txt\nUser=abstock  # or an existing user\nType=simple\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n```\n\nthen:\n\n    systemctl start abstock\n\nto see the logs:\n\n    journalctl -u abstock.service [--since today] [--no-pager] [-o json-pretty] [-f]\n\nuse `-f` to follow the logs as they are written.\n\n### Swank server - remote control\n\nBy default, ABStock will start a Swank server on port `(- *port*\n5000)`, to get a number around 400x.\n\nSet the parameter `*start-swank-server*` to nil in the config file if you don't want to.\n\nThat means that we can connect to the running ABStock application on\nour server, from the comfort of our developer environment at home.\n\nThis is specially useful if we start ABStock with SystemD, because we\nwouldn't get a Lisp REPL. But we still want access to a REPL, for\npoking around and throwing quick commands in.\n\nFrom your machine at home, forward the port of the remote server to localhost:\n\n    ssh -L4006:127.0.0.1:4006 username@example.com\n\nand now do M-x slime-connect, choose localhost and your port 4006. See [the Cookbook](https://lispcookbook.github.io/cl-cookbook/debugging.html#remote-debugging).\n\n\n## Develop\n\nYou can contribute HTML, CSS, JavaScript, testing, documentation, and Common Lisp code. Thanks in advance!\n\nInstall the application locally.\n\n### Static assets. Themes.\n\nCSS and JavaScript files are served from the `src/static` directory under\nthe `/static` prefix (see `*default-static-directory*` in web.lisp).\n\nYou must reference them like this:\n\n    \u003clink rel=\"stylesheet\" href=\"/static/style.css\"\u003e\n\nYou can use `theme.js` and `theme.css` for your own code.\n\nYou can use Bulma's mechanism to create new themes: https://bulma.io/documentation/customize/\n\n### Live reload\n\nTo get live-reload of static files during development, you can use [browser-sync](https://www.browsersync.io/).\n\n```\n$ browser-sync start --proxy http://localhost:8901/ --files src/static/*\n[Browsersync] Proxying: http://localhost:8901\n[Browsersync] Access URLs:\n -------------------------------------\n       Local: http://localhost:3000\n    External: http://192.168.1.11:3000\n -------------------------------------\n          UI: http://localhost:3001\n UI External: http://localhost:3001\n -------------------------------------\n[Browsersync] Watching files...\n[Browsersync] File event [change] : src/static/style.css\n[Browsersync] File event [change] : src/static/style.css\n[…]\n```\n\nNow, whenever you edit some CSS or JS, you see the results instantly in the browser.\n\n### Use the API\n\nABStock defines API endpoints, free for the developer to use to create new applications:\n\n- `/api/v1/selection.json`: get the selection.\n- `/api/v1/lastcreated.json`: get the last created books. Results are cached for 1 hour.\n\n\n## Issues and feature requests\n\nIssue tracker: https://gitlab.com/vindarel/abstock/-/issues\n\nGitHub mirror: https://github.com/vindarel/ABStock\n\nKnown TODOs:\n\n* [X] admin panel\n* [X] read products data from a TXT, CSV or a JSON file\n* [-] i18n / remove a few still hardcoded words\n  - (we managed to translate it, with the config and by overriding templates)\n* [-] online Stripe payments\n  - done upstream in the master software.\n* simple stats\n\n## Changelog\n\n- 2023, January: really use style.css, use a symlink to your theme.css to add styling.\n- 2022, June: the cache files `cards.lisp` and `shelves.lisp` were renamed with a `.lisp-expr` extension.\n\n## Licence\n\nAGPLv3.\n\nThe `src/static/img/no_cover.png` image is a modified version of [this original\none](https://commons.wikimedia.org/wiki/File:Meuble_h%C3%A9raldique_Livre_ouvert_2.svg)\nthat is distributed under CC-BY-SA ([Ssire](https://commons.wikimedia.org/wiki/User:Ssire)).\n\n---\n\nLisp?! Oh yes, Lisp.\n\n* https://lisp-journey.gitlab.io/pythonvslisp/\n* https://lisp-lang.org/success/\n* https://common-lisp.net/\n* https://github.com/CodyReichert/awesome-cl\n* https://lispcookbook.github.io/cl-cookbook/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Fabstock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvindarel%2Fabstock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvindarel%2Fabstock/lists"}