Skip to content

Commit e1b13ef

Browse files
committed
release: v1.0.0 - official GPLv3 license and copyright headers
1 parent abf3951 commit e1b13ef

20 files changed

Lines changed: 1029 additions & 13 deletions

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,96 @@
1-
# README
1+
# ActiveCore 🏋️‍♂️
22

3-
This README would normally document whatever steps are necessary to get the
4-
application up and running.
3+
ActiveCore is a high-performance ERP engine specifically engineered for **Italian Sports Associations (ASD)**. It streamlines the complex bureaucratic and operational requirements of the Italian sports reform, ensuring compliance with institutional rules while maintaining a friction-free experience for the front-desk.
54

6-
Things you may want to cover:
5+
Built on the **Rails 8 "Solid Stack"**, ActiveCore is designed for stability, data integrity, and rapid deployment.
76

8-
* Ruby version
7+
## 🇮🇹 Built for Italian ASD
98

10-
* System dependencies
9+
ActiveCore is designed with the unique logic of Italian sports associations in mind:
1110

12-
* Configuration
11+
- **Quota Associativa (Membership Fee)**: Strict enforcement of the associative bond.
1312

14-
* Database creation
13+
- **Sport Year Alignment**: Support for the Italian "Anno Sportivo" (September - August) logic.
1514

16-
* Database initialization
15+
- **Medical Certificate Management**: Built-in tracking for "Certificato Medico Agonistico/Non Agonistico" with expiration alerts.
1716

18-
* How to run the test suite
17+
- **Fiscal Compliance**: Receipt (Ricevuta) generation with sequential numbering and fiscal locking.
1918

20-
* Services (job queues, cache servers, search engines, etc.)
2119

22-
* Deployment instructions
20+
## ✨ Key Features
2321

24-
* ...
22+
### 🔄 Intelligent Subscription Engine
23+
24+
- **Institutional Snap**: Automatically aligns institutional course subscriptions to calendar months or the sports year.
25+
26+
- **Smart Renewal Logic**: Detects existing subscriptions to eliminate gaps in coverage and calculate "Smart Start Dates".
27+
28+
- **Membership Guard**: A core safety mechanism that prevents selling any sports course if the member does not have a valid, active _Quota Associativa_.
29+
30+
31+
### 🚪 Non-Blocking Access Control
32+
33+
- **Real-time Policy Evaluation**: Instant check on medical certificates, active subscriptions, and payments at the point of entry.
34+
35+
- **Soft Enforcement**: Unlike rigid turnstile systems, ActiveCore logs entries with specific statuses (OK/Warning/Error), allowing staff to handle issues (like an expiring certificate) with empathy rather than blocking the member.
36+
37+
- **Double-tap Prevention**: Cooldown logic to prevent duplicate check-ins within the same training session.
38+
39+
40+
### 📄 Document & Fiscal Engine
41+
42+
- **PDF Receipts**: Automated generation of receipts via Prawn, ready for delivery to members.
43+
44+
- **Sequential Integrity**: Robust handling of receipt sequences to meet accounting standards.
45+
46+
47+
## 🛠 Tech Stack
48+
49+
- **Backend**: [Rails 8.1](https://rubyonrails.org/) running on **Ruby 4.0.3**
50+
51+
- **Frontend**: [Hotwire](https://hotwired.dev/) (Turbo 8 / Stimulus)
52+
53+
- **UI & Styling**: [Tailwind CSS 4](https://tailwindcss.com/) + [daisyUI 5](https://daisyui.com/)
54+
55+
- **Database**: SQLite (optimized for production with WAL mode and immediate transactions)
56+
57+
- **Infrastructure**: [Solid Cache](https://github.com/rails/solid_cache), [Solid Queue](https://github.com/rails/solid_queue), [Solid Cable](https://github.com/rails/solid_cable)
58+
59+
- **Deployment**: [Kamal](https://kamal-deploy.org/) (Docker-based)
60+
61+
62+
## 🚀 Installation & Setup
63+
64+
```
65+
# Clone the repository
66+
git clone https://github.com/jcostd/active-core.git
67+
cd active-core
68+
69+
# Automated setup (install gems, prepare DB, seed data)
70+
bin/setup
71+
72+
# Start the development environment (Rails + Tailwind + DaisyUI)
73+
bin/dev
74+
75+
```
76+
77+
## 🛡 Quality & Security
78+
79+
Data integrity is our top priority. Every build must pass the comprehensive `bin/ci` suite:
80+
81+
- **Minitest**: Full unit and integration testing coverage.
82+
83+
- **Brakeman**: Static analysis for security vulnerabilities.
84+
85+
- **Bundler-Audit**: Verification of dependencies against known CVEs.
86+
87+
- **Rubocop**: Omakase-style code linting for maintainable Ruby.
88+
89+
90+
## 📄 License
91+
92+
This project is released under the **GPLv3 License**.
93+
94+
----------
95+
96+
Developed with ❤️ for the Italian sports community.

app/models/access_log.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class AccessLog < ApplicationRecord
217
include Refreshable
318
include AccessLog::Filterable

app/models/access_policy.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class AccessPolicy
217
include ActiveModel::Model
318

app/models/activity_log.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class ActivityLog < ApplicationRecord
217
belongs_to :user
318
belongs_to :subject, polymorphic: true

app/models/daily_cash.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class DailyCash
217
SPLIT_HOUR = 14
318
attr_reader :date

app/models/discipline.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class Discipline < ApplicationRecord
217
include SoftDeletable
318
include Refreshable

app/models/duration.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
Duration = Data.define(:start_date, :end_date) do
217
CALENDAR_DURATIONS = {
318
30 => 1,

app/models/feedback.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class Feedback < ApplicationRecord
217
belongs_to :user, touch: true
318

app/models/gym_profile.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright (C) 2026 Jacopo Costantini <jacopocostantini32@gmail.com>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 3 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
116
class GymProfile < ApplicationRecord
217
validates :name, presence: true
318

0 commit comments

Comments
 (0)