๐ Seven years ago, Paralect engineers faced a major development headache: the repetitive setup for new projects.
๐ We took our first step on October 11, 2017, with Ship - a robust, open-source platform.
But Ship isn't just a tool today; it's a testament to durability and scalability, effectively handling massive loads and powering over 100+ live products!
๐ฅ Meet Ship: A full-stack boilerplate honed by 13 years of Paralect's innovation. It's free, open-source, and built to last.
Explore Ship's tech stack:
๐ Koa + node.js (@nodejs)
๐ฎ Next.js (@nextjs) + React (@reactjs)
๐จ Mantine (@mantinedev) for stylish components
๐ฆ Turborepo (@turborepo) for monorepo management
๐ node-mongo: reactive extension of MongoDB driver
๐ง React-email & Sendgrid for seamless email flows
๐ Websockets via https://t.co/E4jgOBo4BG
Discover more here: https://t.co/TmPLYOLsyT
#paralectship #dev #opensource #fullstack #js #product #starter #boilerplate #paralect
Styling ๐ข
One of our biggest challenges when launching new projects was dealing with UI components. We went through a long journey, starting from writing custom components from scratch to using other component libraries in our production projects ๐ฃ๏ธ
Finally, we discovered that @mantinedev was the perfect solution for our UI component needs ๐ฅ
Mantine offers a wide range of customizable components and hooks that make it easy to create visually appealing and functional interfaces ๐
It's an ideal match! ๐
๐ Learn more about Mantine in Ship here: https://t.co/P81c7hgokJ
#mantine #ui #frontend #opensource #fullstack #boilerplate #javascript
Authentication flow ๐ข
Ship aims to be the go-to solution for medium-sized web applications, encompassing various user flows. One crucial flow that Ship focuses on is Authentication ๐๏ธ
When it comes to Authentication, Ship has got you covered with these features:
๐ Sign In
๐ Sign Up
๐ Sign Up / Sign In with Google
๐ Forgot password
๐ Reset Password
Keep in mind that this serves as our foundation for the flow. You have the freedom to personalize the form fields to align with your specific needs while maintaining the established structure โ๏ธ
#auth #opensource #fullstack #boilerplate #javascript
Websockets ๐ข
In the realm of real-time communication between clients and servers, websockets have emerged as a powerful tool.
Ship harnesses the capabilities of websockets to facilitate seamless interaction. ๐ช
To streamline the process, we've already established a service on each end of the application called 'socket-service'. This service manages connections and implements token-based authentication for enhanced security. ๐ก๏ธ
Ship specifically utilizes https://t.co/DmNCnImkQB (@SocketIO)- a versatile library that empowers low-latency, bidirectional, and event-driven communication between clients and servers. โก
Furthermore, we integrate a Redis adapter that relies on the Redis Pub/Sub mechanism (https://t.co/aCntrSiNkS) for enhanced efficiency and scalability. ๐
#websockets #opensource #fullstack #boilerplate #javascript
Mailer ๐ข
Simplify email template generation with the Ship's Mailer package ๐จ
Create stunning email templates effortlessly using React components with the 'React Email' library. Each template is customizable and corresponds to a specific email type. ๐ช
Adding a new template? Easy-peasy. โก
Head over to the 'packages/mailer' turborepo package for seamless development. Preview your email instantly on port 3003.
Sending an email? No worries. โ
Just use the 'sendTemplate' function from 'emailService'. Simply provide the recipient, subject, template, and parameter object. โ๏ธ
Ready to use Ship's mailer? Just set the Sendgrid API key as an environment variable in your backend app. ๐ง
Discover more about Mailer in our documentation ๐
https://t.co/tBfz1vB6WZ
Cloud Storage ๐ข
Ship's cloud storage service, powered by the '@aws-sdk/client-s3' library, provides seamless functionality for effortlessly handling file uploads to the cloud. โ๏ธ
Our service offers basic features:
๐ค File uploads (both private and public)
๐ File retrieval options (including signed URLs)
๐ Copying
๐๏ธ Deletion
It's compatible not only with Amazon S3 storage but also with Digital Ocean Spaces. ๐
The base template we provide includes a straightforward example that demonstrates how to upload a user avatar to the cloud, as well as how to update and delete it. ๐ชง
Feel free to explore the source code of this service and share your valuable feedback!
https://t.co/20r1CWSdOX
Logging ๐ข
To ensure comprehensive tracking and monitoring within the application, Ship utilizes the 'winston' library to configure its logger instance. โ๏ธ
The base template provides a thoughtfully crafted logging setup with different levels for various purposes. Take a look at the following log types:
๐ Request and response logs provide detailed information, including endpoint names and request status.
๐ซ Error logs capture unsuccessful requests, helping to identify and address potential issues.
๐ Websocket events are logged to gain insightful insights.
๐พ The dedicated database CUD handler ensures thorough tracking of database operations.
๐ง Logs related to sending emails offer valuable data points.
The diverse range of logs guarantees a well-rounded approach to tracking and monitoring various aspects of the application. โก
I'm back!
Now I dedicate my Twitter to https://t.co/kz6X6Ot24G!
This is all the technical expertise of Paraleัt in one product!
Give advice to a newbies! Where to start launching on Product Hunt?
#producthunt#developers
Scheduler ๐ข
In the world of web applications, repetitive tasks can be a real headache ๐คฏ
But fear not, because we have the solution! ๐ฅ
Say hello to Ship's Scheduler! โฐ
This powerful tool takes care of those pesky tasks that need to be executed at specific intervals throughout the day, month, or year ๐
Imagine effortlessly:
๐ง Sending regular emails to customers
๐ก๏ธ Safeguarding your organization's critical data with backups
๐งน Keeping your databases clean by clearing logs
The Scheduler has got you covered! With its user-friendly interface, you can easily schedule jobs for execution on designated dates or even set recurring patterns. ๐
So, how does it work? ๐ค
The Scheduler consists of two essential components: cron jobs and handlers.
โฒ๏ธ Cron jobs patiently wait for the perfect moment, triggering more specific events.
๐ Handlers diligently listen to events generated by cron jobs, seamlessly running the assigned tasks.
๐ Explore our comprehensive documentation for all the details:
https://t.co/QjNWtIGxMf
Migrator ๐ข
๐ฑ As the application grows, your database schema will also evolve. To ensure compatibility, you'll need to update existing documents when making changes to the schema (adding, removing, or replacing fields).
๐ Migrator is a service that handles MongoDB migrations, versioning, and logging, ensuring that your database data matches the new schema or requirements.
Here's how it works ๐ ๏ธ
๐ Migrator retrieves the current successful migration version from the 'migrationVersion' collection.
โฌ๏ธ It applies each migration above this version in sequence.
๐ Each migration is logged in the 'migrationLog' collection with its status.
Example ๐
To assign special rights to some users, we add a new boolean field 'isAdmin' to the user schema. New users will have 'isAdmin' set automatically upon creation, but old users won't. ๐ฅฒ
Migrator helps add the field to old users. Take a look at the screenshot to get a glimpse of the migration code ๐ฅ๏ธ
More about Migrator in Ship's documentation:
https://t.co/h1ieBcpzXQ
Introducing node-mongo: an open-source reactive extension to the official Node.js MongoDB driver, developed by Paralect engineers. โก
Tested by hundreds of live products, node-mongo offers unbeatable features:
๐ ObjectId mapping: Automatically converts 'ObjectId' to 'string' for the '_id' field.
โ Schema validation: Validate your data before saving with Zod schemas.
๐ Reactive: Get real-time events for document creation, updates, and deletions.
โฒ๏ธ CUD operations timestamps: Auto-set 'createdOn', 'updatedOn', and 'deletedOn' timestamps.
๐ซ Outbox support: Implement the transactional outbox pattern with `_outbox` collections.
๐ Paging: Enjoy a high-level paging API.
and much more...
Don't wait, try it now! Install with 'npm i @paralect/node-mongo' and share your valuable feedback in this thread. โ๏ธ
Explore the power of our open-source MongoDB driver extension here:
https://t.co/YadFRTXGH9
Database ๐ข
Ship relies on MongoDB as its main database. Embracing a document-oriented approach to data management, MongoDB offers Ship flexibility and ease of development that aligns with their goals ๐
Why MongoDB? ๐ค
๐ Easy Horizontal Scaling: MongoDB enables easy scaling across multiple servers to manage increasing data demands.
๐บ๏ธ Simplified Data Mapping: Its document-oriented approach streamlines the mapping of application data to database objects.
๐ Flexible Document Schemas: Offers adaptable, schema-less document structures, easing adjustments to evolving data needs.
While we continue to love and utilize MongoDB in production, we are not limited to it ๐
We complement MongoDB with relational databases and other specialized databases like Redis for caching or Elasticsearch for full-text search ๐
Discover why MongoDB is our go-to choice at Paralect from the arcticle by @that_igor_ :
https://t.co/1rRldLFHMl
Schemas ๐ข
Ship harnesses the power of Zod - the ultimate data validation library. ๐
Why Zod? ๐ค
Zod is designed with TypeScript in mind, enabling us to infer types from schemas rather than writing them separately. ๐ช
Ship minimizes errors across three critical domains:
1. Enhancing the user experience through web form validation, effectively preventing invalid submissions โ
2. Maintaining data integrity, error prevention, and predictability in API requests ๐
3. Ensuring data integrity and preventing inconsistencies by validating data before database insertions and updates ๐
Discover more ๐
https://t.co/Wr5YglMnhF
Architecture ๐ข
Every technological decision is driven by simplicity. โจ
We believe that the product used by people is the only reason why technologies exist. Our goal is to help products stand up on their feet without investing too much in the early stages. ๐ค
On a high level, Ship consists of the following parts:
Web ๐
API ๐ก
Scheduler โฐ
Migrator ๐
Deployment ๐
Check out the image below to see how they all fit together.
Learn more here ๐
https://t.co/1DR41VoDF0