The ideas of the sharing economy have facilitated innovative business applications, such as Uber and Airbnb. As an example of a sharing economy application, ridesharing services take advantage of underutilized resources to create economic value. However, the unruly design of ridesharing systems may make urban traffic more congested and cause other technology-organization-environment issues. This study explores the application of blockchain and smart contract technologies to enhance ridesharing services by harvesting the blockchain benefits of transaction traceability, process transparency, system automation and disintermediation. After presenting system design and implementation details for building and deploying a blockchain-based system to support the reengineered ridesharing service with required business functions, we conduct functionality/performance tests and theory-based comparative analysis to confirm its feasibility and applicability. The results reveal that our system with blockchain-enabled benefits is superior to incumbent ridesharing systems. Moreover, while prior research rarely reports the design and implementation details of blockchain-based systems to support sharing economy services, this paper primarily contributes to extant literature by not only proposing a layered system architecture adapting blockchain and smart contracts into the desired ridesharing service but also demonstrating the design and implementation details, covering the development tools, the deployment environment and the deployed smart contracts.