Add activities endpoint to custom CRM example #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a complete activities feature to the custom CRM example, including database schema, REST endpoint, dashboard UI, and documentation with company engagement update examples.
Changes
Database Schema (
prisma/schema.prisma)Activitymodel with fields for:contactId- links activity to a contacttype- activity type (email, call, linkedin_message, etc.)direction- inbound or outboundsubjectandbody- activity contentmetadata- JSON field for additional dataoccurredAt- when the activity happenedREST API (
server.js)POST /activities- Create a new activityGET /activities- List all activities (with optionalcontactIdfilter)GET /activities/:id- Get a single activity by IDDashboard UI
activities.htmlpage - Full CRUD interface for viewing activitiesDocumentation (
README.md)Files Changed
README.md(+82)prisma/schema.prisma(+15)public/activities.html(+177) - New filepublic/companies.html(+1)public/contacts.html(+1)public/index.html(+11, -1)public/tasks.html(+1)server.js(+41)Total: +329, -1
Related PRs